Class SdkLengthAwareInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
software.amazon.awssdk.core.internal.io.SdkLengthAwareInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
An
InputStream that is aware of its length. This class enforces that we sent exactly the number of bytes equal to
the input length. If the wrapped stream has more bytes than the expected length, it will be truncated to length. If the stream
has less bytes (i.e. reaches EOF) before the expected length is reached, it will throw IOException.-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.io.FilterInputStream
close, markSupported, read
-
Constructor Details
-
SdkLengthAwareInputStream
-
-
Method Details
-
read
- Overrides:
readin classFilterInputStream- Throws:
IOException
-
read
- Overrides:
readin classFilterInputStream- Throws:
IOException
-
skip
- Overrides:
skipin classFilterInputStream- Throws:
IOException
-
available
- Overrides:
availablein classFilterInputStream- Throws:
IOException
-
mark
public void mark(int readlimit) - Overrides:
markin classFilterInputStream
-
reset
- Overrides:
resetin classFilterInputStream- Throws:
IOException
-
remaining
public long remaining()
-