it.unimi.dsi.mg4j.io
Class NullInputStream

java.lang.Object
  extended byjava.io.InputStream
      extended byit.unimi.dsi.mg4j.io.NullInputStream

public class NullInputStream
extends InputStream

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

Method Summary
static NullInputStream getInstance()
          Returns the only instance of this class.
 int read()
           
 
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()

getInstance

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