org.openide.util.io
Class NullInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by org.openide.util.io.NullInputStream
All Implemented Interfaces:
java.io.Closeable

public class NullInputStream
extends java.io.InputStream

Input stream that is always empty.

Author:
Ales Novak

Field Summary
 boolean throwException
          True if attempting to read from the stream should throw an IOException.
 
Constructor Summary
NullInputStream()
          Create an empty null input stream.
 
Method Summary
 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
 

Field Detail

throwException

public boolean throwException
True if attempting to read from the stream should throw an IOException. False to simply return end of file.

Constructor Detail

NullInputStream

public NullInputStream()
Create an empty null input stream.

Method Detail

read

public int read()
         throws java.io.IOException
Specified by:
read in class java.io.InputStream
Throws:
java.io.IOException