com.twelvemonkeys.io
Class NullInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by com.twelvemonkeys.io.NullInputStream
All Implemented Interfaces:
Closeable

public class NullInputStream
extends InputStream

An InputStream that contains no bytes.

Version:
$Id: //depot/branches/personal/haraldk/twelvemonkeys/release-2/twelvemonkeys-core/src/main/java/com/twelvemonkeys/io/NullInputStream.java#2 $
Author:
Harald Kuhr

Constructor Summary
NullInputStream()
          Creates a NullInputStream.
 
Method Summary
 int available()
          This implementation returns 0, always.
 int read()
          This implementation returns -1 (EOF), always.
 long skip(long pOffset)
          This implementation returns 0, always.
 
Methods inherited from class java.io.InputStream
close, mark, markSupported, read, read, reset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullInputStream

public NullInputStream()
Creates a NullInputStream.

Method Detail

read

public int read()
         throws IOException
This implementation returns -1 (EOF), always.

Specified by:
read in class InputStream
Returns:
-1
Throws:
IOException

available

public int available()
              throws IOException
This implementation returns 0, always.

Overrides:
available in class InputStream
Returns:
0
Throws:
IOException

skip

public long skip(long pOffset)
          throws IOException
This implementation returns 0, always.

Overrides:
skip in class InputStream
Returns:
0
Throws:
IOException


Copyright © 2015. All Rights Reserved.