G - Type of object that the parser produces.public interface Parser<G>
| Modifier and Type | Method and Description |
|---|---|
java.util.List<java.lang.String> |
getFileExtensions()
Get a list of recommended file extensions.
|
java.lang.String |
getFormat()
Which format does this parser understand?
|
G |
parse(java.io.InputStream input)
Parse an input stream into an object.
|
G |
parseFile(java.io.File file)
Parse an object from a file.
|
G |
parseFile(java.lang.String filename)
Parse an object from a file.
|
G |
parseString(java.lang.String input)
Parse a string into an object.
|
java.lang.String getFormat()
java.util.List<java.lang.String> getFileExtensions()
G parseString(java.lang.String input) throws ParseException
input - The input string to read the object from.ParseException - If the input can't get parsed.G parse(java.io.InputStream input) throws ParseException, java.io.IOException
input - The input stream to read the object from.ParseException - If the input can't get parsed.java.io.IOException - If readig the input fails.G parseFile(java.lang.String filename) throws ParseException, java.io.IOException
filename - The input filename to read the object from.ParseException - If the input can't get parsed.java.io.IOException - If readig the input fails.G parseFile(java.io.File file) throws ParseException, java.io.IOException
file - The input file to read the object from.ParseException - If the input can't get parsed.java.io.IOException - If readig the input fails.