Package software.amazon.awssdk.utils
Class LookaheadInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
software.amazon.awssdk.utils.LookaheadInputStream
- All Implemented Interfaces:
 Closeable,AutoCloseable
A wrapper for an 
InputStream that allows peek()ing one byte ahead in the stream. This is useful for
 detecting the end of a stream without actually consuming any data in the process (e.g. so the stream can be passed to
 another library that doesn't handle end-of-stream as the first byte well).- 
Constructor Summary
Constructors - 
Method Summary
Methods inherited from class java.io.FilterInputStream
close, markSupported, read 
- 
Constructor Details
- 
LookaheadInputStream
 
 - 
 - 
Method Details
- 
peek
- Throws:
 IOException
 - 
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
 
 -