Package com.twelvemonkeys.io
Class NullInputStream
- java.lang.Object
-
- java.io.InputStream
-
- com.twelvemonkeys.io.NullInputStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
public class NullInputStream extends java.io.InputStream
AnInputStream
that contains no bytes.- Version:
- $Id: //depot/branches/personal/haraldk/twelvemonkeys/release-2/twelvemonkeys-core/src/main/java/com/twelvemonkeys/io/NullInputStream.java#2 $
-
-
Constructor Summary
Constructors Constructor Description NullInputStream()
Creates aNullInputStream
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
available()
This implementation returns0
, always.int
read()
This implementation returns-1
(EOF), always.long
skip(long pOffset)
This implementation returns0
, always.
-
-
-
Method Detail
-
read
public int read() throws java.io.IOException
This implementation returns-1
(EOF), always.- Specified by:
read
in classjava.io.InputStream
- Returns:
-1
- Throws:
java.io.IOException
-
available
public int available() throws java.io.IOException
This implementation returns0
, always.- Overrides:
available
in classjava.io.InputStream
- Returns:
0
- Throws:
java.io.IOException
-
skip
public long skip(long pOffset) throws java.io.IOException
This implementation returns0
, always.- Overrides:
skip
in classjava.io.InputStream
- Returns:
0
- Throws:
java.io.IOException
-
-