public interface ObjectParser
Parses 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 | InputStream input stream which contains the data to parse |
charset | Charset charset 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 | Reader reader 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 | InputStream input stream which contains the data to parse |
charset | Charset charset which should be used to decode the input stream or |
dataType | Type type 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 | Reader reader which contains the text data to parse |
dataType | Type type into which the data is parsed |
Type | Description |
Object |
Type | Description |
IOException |