|
abc4j API Specification | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectabc.parser.AbcParserAbstract
abc.parser.AbcFileParser
public class AbcFileParser
This class provides instances to parse files and streams using abc notation. Parser instances from this class will parse the whole content of the input files / streams (headers + music). If you are only interested in getting tune headers, you'd better use the AbcHeadersParser that will restrict the parsing to abc headers. Such parsing is faster than parsing the whole content of the file (about 10x from what I've been able to measure...).
AbcHeadersParser| 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)
Deprecated. |
void |
parseFileHeaders(java.io.File abcFile)
Deprecated. |
void |
removeListener(AbcFileParserListenerInterface listener)
Removes a listener from this parser. |
| Methods inherited from class abc.parser.AbcParserAbstract |
|---|
addListener, getScanner, removeListener |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbcFileParser()
| Method Detail |
|---|
public void addListener(AbcFileParserListenerInterface listener)
listener - Object that implements the TuneParserListenerInterface.removeListener(abc.parser.AbcFileParserListenerInterface)public void removeListener(AbcFileParserListenerInterface listener)
listener - The listener to be removed.addListener(abc.parser.AbcFileParserListenerInterface)
public void parseFile(java.io.File abcFile)
throws java.io.FileNotFoundException
abcFile - The file to be parsed.
java.io.FileNotFoundException - Thrown if the specified file isn't found.public void parseFile(java.io.Reader abcCharStream)
abcCharStream - The abc stream to be parsed.
public void parseFileHeaders(java.io.File abcFile)
throws java.io.FileNotFoundException
abcFile - A text file using ABC notation.
java.io.FileNotFoundException - Thrown if the specified file isn't found.public void parseFileHeaders(java.io.BufferedReader charStream)
|
abc4j API Specification | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||