Class SdkLengthAwareInputStream
- java.lang.Object
-
- java.io.InputStream
-
- java.io.FilterInputStream
-
- software.amazon.awssdk.core.internal.io.SdkLengthAwareInputStream
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class SdkLengthAwareInputStream extends FilterInputStream
AnInputStreamthat 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.
-
-
Field Summary
-
Fields inherited from class java.io.FilterInputStream
in
-
-
Constructor Summary
Constructors Constructor Description SdkLengthAwareInputStream(InputStream in, long length)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intavailable()voidmark(int readlimit)intread()intread(byte[] b, int off, int len)longremaining()voidreset()longskip(long requestedBytesToSkip)-
Methods inherited from class java.io.FilterInputStream
close, markSupported, read
-
-
-
-
Constructor Detail
-
SdkLengthAwareInputStream
public SdkLengthAwareInputStream(InputStream in, long length)
-
-
Method Detail
-
read
public int read() throws IOException- Overrides:
readin classFilterInputStream- Throws:
IOException
-
read
public int read(byte[] b, int off, int len) throws IOException- Overrides:
readin classFilterInputStream- Throws:
IOException
-
skip
public long skip(long requestedBytesToSkip) throws IOException- Overrides:
skipin classFilterInputStream- Throws:
IOException
-
available
public int available() throws IOException- Overrides:
availablein classFilterInputStream- Throws:
IOException
-
mark
public void mark(int readlimit)
- Overrides:
markin classFilterInputStream
-
reset
public void reset() throws IOException- Overrides:
resetin classFilterInputStream- Throws:
IOException
-
remaining
public long remaining()
-
-