Class LengthAwareInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
software.amazon.awssdk.utils.io.LengthAwareInputStream
- All Implemented Interfaces:
- Closeable,- AutoCloseable
- Direct Known Subclasses:
- ChunkInputStream
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 SummaryConstructors
- 
Method SummaryMethods inherited from class java.io.FilterInputStreamclose, markSupported, read
- 
Constructor Details- 
LengthAwareInputStream
 
- 
- 
Method Details- 
read- Overrides:
- readin class- FilterInputStream
- Throws:
- IOException
 
- 
read- Overrides:
- readin class- FilterInputStream
- Throws:
- IOException
 
- 
skip- Overrides:
- skipin class- FilterInputStream
- Throws:
- IOException
 
- 
available- Overrides:
- availablein class- FilterInputStream
- Throws:
- IOException
 
- 
markpublic final void mark(int readlimit) - Overrides:
- markin class- FilterInputStream
 
- 
reset- Overrides:
- resetin class- FilterInputStream
- Throws:
- IOException
 
- 
remainingpublic final long remaining()
 
-