class DefiniteLengthInputStream extends LimitedInputStream
Modifier and Type | Field and Description |
---|---|
private int |
_originalLength |
private int |
_remaining |
private static byte[] |
EMPTY_BYTES |
_in
Constructor and Description |
---|
DefiniteLengthInputStream(InputStream in,
int length) |
Modifier and Type | Method and Description |
---|---|
(package private) int |
getRemaining() |
int |
read() |
int |
read(byte[] buf,
int off,
int len) |
(package private) byte[] |
toByteArray() |
setParentEofDetect
available, close, mark, markSupported, read, reset, skip
private static final byte[] EMPTY_BYTES
private final int _originalLength
private int _remaining
DefiniteLengthInputStream(InputStream in, int length)
int getRemaining()
getRemaining
in class LimitedInputStream
public int read() throws IOException
read
in class InputStream
IOException
public int read(byte[] buf, int off, int len) throws IOException
read
in class InputStream
IOException
byte[] toByteArray() throws IOException
IOException