Closeable
, AutoCloseable
public final class SubStream extends FilterInputStream
InputStream
reading up to a specified number of bytes from an
underlying stream.
in
Constructor | Description |
---|---|
SubStream(InputStream pStream,
long pLength) |
Creates a
SubStream of the given pStream . |
Modifier and Type | Method | Description |
---|---|---|
int |
available() |
|
void |
close() |
Marks this stream as closed.
|
void |
mark(int pReadLimit) |
|
int |
read() |
|
int |
read(byte[] pBytes) |
|
int |
read(byte[] pBytes,
int pOffset,
int pLength) |
|
void |
reset() |
|
long |
skip(long pLength) |
markSupported
readAllBytes, readNBytes, transferTo
public SubStream(InputStream pStream, long pLength)
SubStream
of the given pStream
.pStream
- the underlying input streampLength
- maximum number of bytes to read drom this streampublic void close() throws IOException
close
in interface AutoCloseable
close
in interface Closeable
close
in class FilterInputStream
IOException
public int available() throws IOException
available
in class FilterInputStream
IOException
public void mark(int pReadLimit)
mark
in class FilterInputStream
public void reset() throws IOException
reset
in class FilterInputStream
IOException
public int read() throws IOException
read
in class FilterInputStream
IOException
public final int read(byte[] pBytes) throws IOException
read
in class FilterInputStream
IOException
public int read(byte[] pBytes, int pOffset, int pLength) throws IOException
read
in class FilterInputStream
IOException
public long skip(long pLength) throws IOException
skip
in class FilterInputStream
IOException
Copyright © 2018. All rights reserved.