T
- the type of the object to readpublic class InputStreamObjectDataReader<T> extends java.lang.Object implements ObjectDataReader<T>
ObjectDataReader
that reads an object by reading from a specific
InputDataSource
and converting the read data with a specific
InputStreamInputConverter
.Constructor and Description |
---|
InputStreamObjectDataReader(InputDataSource dataSource,
InputStreamInputConverter<T> converter)
Construct an instance that will use the specified data source to read data from and convert it to an object with
the specified converter.
|
Modifier and Type | Method and Description |
---|---|
GluonObservableObject<T> |
newGluonObservableObject()
Provide an instance of a GluonObservableObject.
|
T |
readObject()
Reads the object from the specified data source.
|
public InputStreamObjectDataReader(InputDataSource dataSource, InputStreamInputConverter<T> converter)
read
method.dataSource
- the data source where the data will be read fromconverter
- the converter that is used for converting the data into an objectpublic GluonObservableObject<T> newGluonObservableObject()
ObjectDataReader
DataProvider.retrieveObject(ObjectDataReader)
to get a GluonObservableObject that will contain the actual object when the retrieve operation has completed
successfully. Most implementations will just return an instance of GluonObservableObject itself. Note that it is
perfectly valid to return existing instances of GluonObservableObject.newGluonObservableObject
in interface ObjectDataReader<T>
public T readObject() throws java.io.IOException
read
method on the
converter.readObject
in interface ObjectDataReader<T>
java.io.IOException
- when an exception occurred during the read process