Interface Info |
|---|
public interface ObjectParser Parses the data source into a specified data type. |
Qualifier and Type | Method Name and Description |
|---|---|
<T> T | parseAndClose(InputStream in, Charset charset, Class<T> dataClass) Parses the specified input stream into a new instance of the specified data class in key-value pairs, and closes the input stream. |
<T> T | parseAndClose(Reader reader, Class<T> dataClass) Parses the specified reader into a new instance of the specified data class in key-value pairs, and closes the reader. |
Object | parseAndClose(InputStream in, Charset charset, Type dataType) Parses the specified input stream into a new instance of key-value pairs of the specified data type, and closes the input stream. |
Object | parseAndClose(Reader reader, Type dataType) Parses the specified reader into a new instance of key-value pairs of the specified data type, and closes the reader. |
Method |
|---|
<T> T parseAndClose(InputStream in, Charset charset, Class<T> dataClass) Parses the specified input stream into a new instance of the specified data class in key-value pairs, and closes the input stream. |
Parameters
Name | Description |
|---|---|
in | Input stream containing the data to be parsed. |
charset | Character set used to decode the input stream. |
dataClass | Class to which the data is parsed. |
Returns
Name | Description |
|---|---|
<T> T | Specified data type. |
Throws
Name | Description |
|---|---|
java.io.IOException | I/O exception thrown upon an API call failure. You can use the getMessage() method to obtain the error description. |
Method |
|---|
<T> T parseAndClose(Reader reader, Class<T> dataClass) throws IOException Parses the specified reader into a new instance of the specified data class in key-value pairs, and closes the reader. |
Parameters
Name | Description |
|---|---|
reader | Reader containing the text data to be parsed. |
dataClass | Class to which the data is parsed. |
Returns
Name | Description |
|---|---|
<T> T | Specified data type. |
Throws
Name | Description |
|---|---|
java.io.IOException | I/O exception thrown upon an API call failure. You can use the getMessage() method to obtain the error description. |
Method |
|---|
Object parseAndClose(InputStream in, Charset charset, Type dataType) throws IOException Parses the specified input stream into a new instance of key-value pairs of the specified data type, and closes the input stream. |
Parameters
Name | Description |
|---|---|
in | Input stream containing the data to be parsed. |
charset | Character set used to decode the input stream. |
dataType | Data type to which the data is parsed. |
Returns
Name | Description |
|---|---|
Object | Specified data type. |
Throws
Name | Description |
|---|---|
java.io.IOException | I/O exception thrown upon an API call failure. You can use the getMessage() method to obtain the error description. |
Method |
|---|
Object parseAndClose(Reader reader, Type dataType) throws IOException Parses the specified reader into a new instance of key-value pairs of the specified data type, and closes the reader. |
Parameters
Name | Description |
|---|---|
reader | Reader containing the text data to be parsed. |
dataType | Data type to which the data is parsed. |
Returns
Name | Description |
|---|---|
Object | Specified data type. |
Throws
Name | Description |
|---|---|
java.io.IOException | I/O exception thrown upon an API call failure. You can use the getMessage() method to obtain the error description. |