abc.parser
Class AbcFileParser

java.lang.Object
  extended byabc.parser.AbcParserAbstract
      extended byabc.parser.AbcFileParser

public class AbcFileParser
extends AbcParserAbstract

An abc parser to parse abc files written using abc notation.


Constructor Summary
AbcFileParser()
          Creates a new abc file parser.
 
Method Summary
 void addListener(AbcFileParserListenerInterface listener)
          Adds a listener to catch events thrwon by the parser durin tune parsing.
 void parseFile(java.io.File abcFile)
          Parses the specified file.
 void parseFile(java.io.Reader abcCharStream)
          Parses the specified stream in abc notation.
 void parseFileHeaders(java.io.BufferedReader charStream)
           
 void parseFileHeaders(java.io.File abcFile)
          Parses only tunes header of the the specified file.
 void removeListener(AbcFileParserListenerInterface listener)
          Removes a listener from this parser.
 
Methods inherited from class abc.parser.AbcParserAbstract
addListener, getScanner, parse, parse, parseHeader, parseHeader, removeListener
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbcFileParser

public AbcFileParser()
Creates a new abc file parser.

Method Detail

addListener

public void addListener(AbcFileParserListenerInterface listener)
Adds a listener to catch events thrwon by the parser durin tune parsing.

Parameters:
listener - Object that implements the TuneParserListenerInterface.
See Also:
removeListener(abc.parser.AbcFileParserListenerInterface)

removeListener

public void removeListener(AbcFileParserListenerInterface listener)
Removes a listener from this parser.

Parameters:
listener - The listener to be removed.
See Also:
addListener(abc.parser.AbcFileParserListenerInterface)

parseFile

public void parseFile(java.io.File abcFile)
               throws java.io.FileNotFoundException
Parses the specified file.

Parameters:
abcFile - The file to be parsed.
Throws:
java.io.FileNotFoundException - Thrown if the specified file isn't found.

parseFileHeaders

public void parseFileHeaders(java.io.File abcFile)
                      throws java.io.FileNotFoundException
Parses only tunes header of the the specified file.

Parameters:
abcFile - A text file using ABC notation.
Throws:
java.io.FileNotFoundException - Thrown if the specified file isn't found.

parseFile

public void parseFile(java.io.Reader abcCharStream)
Parses the specified stream in abc notation.

Parameters:
abcCharStream - The abc stream to be parsed.

parseFileHeaders

public void parseFileHeaders(java.io.BufferedReader charStream)