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() |
setParentEofDetectavailable, close, mark, markSupported, read, reset, skipprivate static final byte[] EMPTY_BYTES
private final int _originalLength
private int _remaining
DefiniteLengthInputStream(InputStream in, int length)
int getRemaining()
getRemaining in class LimitedInputStreampublic int read() throws IOException
read in class InputStreamIOExceptionpublic int read(byte[] buf, int off, int len) throws IOException
read in class InputStreamIOExceptionbyte[] toByteArray() throws IOException
IOException