public class RangedInputStream extends CountingInputStream
| Constructor and Description |
|---|
RangedInputStream(InputStream in,
long length) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
int |
read()
Reads the next byte of data from this input stream.
|
int |
read(byte[] b)
Reads up to byte.length bytes of data from this input stream into an array of bytes.
|
int |
read(byte[] b,
int off,
int len)
Reads up to len bytes of data from this input stream into an array of bytes.
|
long |
skip(long n)
Skips over and discards n bytes of data from the input stream.
|
getOffsetavailable, mark, markSupported, resetpublic RangedInputStream(InputStream in, long length)
in - public int read()
throws IOException
CountingInputStreamread in class CountingInputStream-1 if the end of stream is reachedIOException - if an I/O error occurspublic int read(byte[] b,
int off,
int len)
throws IOException
CountingInputStreamread in class CountingInputStreamb - the buffer into which the data is readoff - the start offset in the buffer to write the datalen - the maximum number of bytes to read-1 if there
is no more data because the end of the stream has been reached.IOException - if an I/O error occurspublic int read(byte[] b)
throws IOException
CountingInputStreamread in class CountingInputStream-1 if there
is no more data because the end of the stream has been reached.IOException - if an I/O error occurspublic long skip(long n)
throws IOException
CountingInputStreamskip in class CountingInputStreamn - the number of bytes to be skippedIOException - if an I/O error occurspublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class FilterInputStreamIOExceptionCopyright © 2010 - 2020 Adobe. All Rights Reserved