public final class SubStream extends FilterInputStream
InputStream reading up to a specified number of bytes from an
underlying stream.in| Constructor and Description |
|---|
SubStream(InputStream stream,
long length)
Creates a
SubStream of the given stream. |
| Modifier and Type | Method and Description |
|---|---|
int |
available() |
void |
close()
Marks this stream as closed.
|
void |
mark(int readLimit) |
int |
read() |
int |
read(byte[] bytes) |
int |
read(byte[] bytes,
int off,
int len) |
void |
reset() |
long |
skip(long length) |
markSupportedpublic SubStream(InputStream stream, long length)
SubStream of the given stream.stream - the underlying input streamlength - maximum number of bytes to read from this streampublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class FilterInputStreamIOExceptionpublic int available()
throws IOException
available in class FilterInputStreamIOExceptionpublic void mark(int readLimit)
mark in class FilterInputStreampublic void reset()
throws IOException
reset in class FilterInputStreamIOExceptionpublic int read()
throws IOException
read in class FilterInputStreamIOExceptionpublic int read(byte[] bytes)
throws IOException
read in class FilterInputStreamIOExceptionpublic int read(byte[] bytes,
int off,
int len)
throws IOException
read in class FilterInputStreamIOExceptionpublic long skip(long length)
throws IOException
skip in class FilterInputStreamIOExceptionCopyright © 2023. All rights reserved.