public interface ObjectParserParses a data source into the specified data type.
Implementations should normally be thread-safe.
Methods
<T>parseAndClose(InputStream in, Charset charset, Class<T> dataClass)
public abstract T <T>parseAndClose(InputStream in, Charset charset, Class<T> dataClass)Parses the given input stream into a new instance of the the given data class of key/value pairs and closes the input stream.
| Name | Description |
in |
InputStreaminput stream which contains the data to parse |
charset |
Charsetcharset which should be used to decode the input stream or |
dataClass |
Class<T>class into which the data is parsed |
| Type | Description |
T |
| Type | Description |
IOException |
<T>parseAndClose(Reader reader, Class<T> dataClass)
public abstract T <T>parseAndClose(Reader reader, Class<T> dataClass)Parses the given reader into a new instance of the the given data class of key/value pairs and closes the reader.
| Name | Description |
reader |
Readerreader which contains the text data to parse |
dataClass |
Class<T>class into which the data is parsed |
| Type | Description |
T |
| Type | Description |
IOException |
parseAndClose(InputStream in, Charset charset, Type dataType)
public abstract Object parseAndClose(InputStream in, Charset charset, Type dataType)Parses the given input stream into a new instance of the the given data type of key/value pairs and closes the input stream.
| Name | Description |
in |
InputStreaminput stream which contains the data to parse |
charset |
Charsetcharset which should be used to decode the input stream or |
dataType |
Typetype into which the data is parsed |
| Type | Description |
Object |
| Type | Description |
IOException |
parseAndClose(Reader reader, Type dataType)
public abstract Object parseAndClose(Reader reader, Type dataType)Parses the given reader into a new instance of the the given data type of key/value pairs and closes the reader.
| Name | Description |
reader |
Readerreader which contains the text data to parse |
dataType |
Typetype into which the data is parsed |
| Type | Description |
Object |
| Type | Description |
IOException |