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 SummaryConstructors
- 
Method SummaryMethods inherited from class java.io.FilterInputStreamclose, markSupported, read
- 
Constructor Details- 
LookaheadInputStream
 
- 
- 
Method Details- 
peek- Throws:
- IOException
 
- 
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 void mark(int readlimit) - Overrides:
- markin class- FilterInputStream
 
- 
reset- Overrides:
- resetin class- FilterInputStream
- Throws:
- IOException
 
 
-