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.
| Parameters | |
|---|---|
| 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 | 
| Returns | |
|---|---|
| Type | Description | 
| T | |
| Exceptions | |
|---|---|
| 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.
| Parameters | |
|---|---|
| Name | Description | 
| reader | Readerreader which contains the text data to parse | 
| dataClass | Class<T>class into which the data is parsed | 
| Returns | |
|---|---|
| Type | Description | 
| T | |
| Exceptions | |
|---|---|
| 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.
| Parameters | |
|---|---|
| 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 | 
| Returns | |
|---|---|
| Type | Description | 
| Object | |
| Exceptions | |
|---|---|
| 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.
| Parameters | |
|---|---|
| Name | Description | 
| reader | Readerreader which contains the text data to parse | 
| dataType | Typetype into which the data is parsed | 
| Returns | |
|---|---|
| Type | Description | 
| Object | |
| Exceptions | |
|---|---|
| Type | Description | 
| IOException | |