public class NullInputStream extends InputStream
Constructor and Description |
---|
NullInputStream() |
Modifier and Type | Method and Description |
---|---|
int |
available()
Always returns 0 to indicate that no bytes are available.
|
int |
read()
Unconditionally returns
-1 to indicate the end of stream has been reached. |
int |
read(byte[] b)
Unconditionally returns
-1 to indicate the end of stream has been reached. |
int |
read(byte[] b,
int off,
int len)
Unconditionally returns
-1 to indicate the end of stream has been reached. |
long |
skip(long n)
Always returns 0 to indicate that no bytes were skipped.
|
close, mark, markSupported, reset
public NullInputStream()
public int read()
-1
to indicate the end of stream has been reached.read
in class InputStream
-1
to indicate the end of stream has been reached.public int read(byte[] b)
-1
to indicate the end of stream has been reached.read
in class InputStream
b
- The byte to read.-1
to indicate the end of stream has been reached.public int read(byte[] b, int off, int len)
-1
to indicate the end of stream has been reached.read
in class InputStream
b
- the buffer into which the data is read.off
- the start offset in array b at which the data is written.len
- the maximum number of bytes to read.-1
to indicate the end of stream has been reached.public long skip(long n)
skip
in class InputStream
n
- the number of bytes to be skipped.public int available()
available
in class InputStream
Copyright © 2014 ForgeRock AS. All rights reserved.