T
- Type of object being read.SOURCE
- The type of the source of data for the object being readpublic interface ObjectReader<T,SOURCE>
Modifier and Type | Method and Description |
---|---|
boolean |
canRead(SOURCE source,
String name)
Returns true if the stream can be read, or false otherwise.
|
T |
read(SOURCE source)
Read an object from the source
|
T read(SOURCE source) throws IOException
source
- the sourceIOException
- if an error occursboolean canRead(SOURCE source, String name)
This method is not normally called directly; rather,
IOUtils.canRead(ObjectReader, Object, String)
should be used
instead.
source
- the data sourcename
- the name of the file behind the stream (can be null).ObjectReader
can read the stream; false
otherwise.IOUtils.canRead(ObjectReader, Object, String)