public class NullInputStream extends MeasurableInputStream implements RepositionableStream, Serializable
This stream has length 0, and will always return end-of-file on any read attempt.
This class is a singleton. You cannot create a null input stream,
but you can obtain an instance of this class using getInstance().
| Modifier and Type | Method and Description |
|---|---|
static NullInputStream |
getInstance()
Returns the only instance of this class.
|
long |
length() |
long |
position() |
void |
position(long position) |
int |
read() |
available, close, mark, markSupported, read, read, reset, skippublic int read()
read in class InputStreampublic static NullInputStream getInstance()
public long length()
length in interface MeasurableStreampublic long position()
position in interface MeasurableStreamposition in interface RepositionableStreampublic void position(long position)
throws IOException
position in interface RepositionableStreamIOException