|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.io.InputStream
org.dmonix.io.NullInputStream
The class simulates the functionality provided by reading from /dev/null/.
I.e. the same value (default null) will continously be returned.
There will be no end to the data read from this stream.
Copyright: Copyright (c) 2005
Company: dmonix.org
| Constructor Summary | |
NullInputStream()
Creates a stream that always returns the byte value 0 (null). |
|
NullInputStream(byte value)
Creates a stream that always returns the provided byte value. |
|
| Method Summary | |
int |
read()
Reads the next byte of data from the input stream. |
int |
read(byte[] b)
Stores the pre defined byte value in the provided array. |
int |
read(byte[] b,
int offset,
int length)
Stores the pre defined byte value in the provided array. |
| Methods inherited from class java.io.InputStream |
available, close, mark, markSupported, reset, skip |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public NullInputStream()
public NullInputStream(byte value)
value - The value to use in the read methods| Method Detail |
public int read()
throws java.io.IOException
java.io.IOException
public int read(byte[] b,
int offset,
int length)
throws java.io.IOException
b - The array to store data inoffset - The offset to where to start storing data in the arraylength - The number of bytes to store in the array
java.io.IOException
public int read(byte[] b)
throws java.io.IOException
read(b, 0, b.length)
b - The array to store data in
java.io.IOException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||