it.unimi.dsi.mg4j.io
Class NullInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by it.unimi.dsi.fastutil.io.MeasurableInputStream
          extended by it.unimi.dsi.mg4j.io.NullInputStream
All Implemented Interfaces:
RepositionableStream, Closeable, Serializable

Deprecated. Moved to dsiutils.

@Deprecated
public class NullInputStream
extends MeasurableInputStream
implements RepositionableStream, Serializable

End-of-stream-only input stream.

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().

Since:
0.8
Author:
Sebastiano Vigna
See Also:
Serialized Form

Method Summary
static NullInputStream getInstance()
          Deprecated. Returns the only instance of this class.
 long length()
          Deprecated.  
 long position()
          Deprecated.  
 void position(long position)
          Deprecated.  
 int read()
          Deprecated.  
 
Methods inherited from class java.io.InputStream
available, close, mark, markSupported, read, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

read

public int read()
Deprecated. 
Specified by:
read in class InputStream

getInstance

public static NullInputStream getInstance()
Deprecated. 
Returns the only instance of this class.

Returns:
the only instance of this class.

length

public long length()
Deprecated. 
Specified by:
length in class MeasurableInputStream

position

public long position()
Deprecated. 
Specified by:
position in interface RepositionableStream
Specified by:
position in class MeasurableInputStream

position

public void position(long position)
              throws IOException
Deprecated. 
Specified by:
position in interface RepositionableStream
Throws:
IOException