T
- Type of object being read.public interface InputStreamObjectReader<T> extends ObjectReader<T,InputStream>
InputStream
.Modifier and Type | Method and Description |
---|---|
boolean |
canRead(InputStream stream,
String name)
Returns true if the stream can be read, or false otherwise.
|
read
boolean canRead(InputStream stream, String name)
Typically implementations will read just the first few bytes from the
stream to determine if the data can be read. This method is not normally
called directly; rather,
IOUtils.canRead(InputStreamObjectReader, java.io.BufferedInputStream, String)
should be used instead as it is capable of resetting the stream to its
initial condition.
canRead
in interface ObjectReader<T,InputStream>
stream
- the input streamname
- the name of the file behind the stream (can be null).InputStreamObjectReader
can read the stream;
false otherwise.IOUtils.canRead(InputStreamObjectReader,
java.io.BufferedInputStream, String)