public class SdkLengthAwareInputStream extends FilterInputStream
InputStream
that is aware of its length. The main purpose of this class is to support truncating streams to a
length that is shorter than the total length of the stream.in
Constructor and Description |
---|
SdkLengthAwareInputStream(InputStream in,
long length) |
Modifier and Type | Method and Description |
---|---|
int |
available() |
void |
mark(int readlimit) |
int |
read() |
int |
read(byte[] b,
int off,
int len) |
long |
remaining() |
void |
reset() |
long |
skip(long requestedBytesToSkip) |
close, markSupported, read
public SdkLengthAwareInputStream(InputStream in, long length)
public int read() throws IOException
read
in class FilterInputStream
IOException
public int read(byte[] b, int off, int len) throws IOException
read
in class FilterInputStream
IOException
public long skip(long requestedBytesToSkip) throws IOException
skip
in class FilterInputStream
IOException
public int available() throws IOException
available
in class FilterInputStream
IOException
public void mark(int readlimit)
mark
in class FilterInputStream
public void reset() throws IOException
reset
in class FilterInputStream
IOException
public long remaining()
Copyright © 2023. All rights reserved.