Class AwsChunkedInputStream
- java.lang.Object
-
- java.io.InputStream
-
- software.amazon.awssdk.core.io.SdkInputStream
-
- software.amazon.awssdk.core.internal.io.AwsChunkedInputStream
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Releasable
- Direct Known Subclasses:
AwsChunkedEncodingInputStream
,AwsCompressionInputStream
public abstract class AwsChunkedInputStream extends SdkInputStream
A wrapper of InputStream that implements streaming in chunks.
-
-
Field Summary
Fields Modifier and Type Field Description protected software.amazon.awssdk.core.internal.io.ChunkContentIterator
currentChunkIterator
Iterator on the current chunk.static int
DEFAULT_CHUNK_SIZE
protected InputStream
is
protected boolean
isAtStart
protected boolean
isTerminating
protected static Logger
log
protected static int
SKIP_BUFFER_SIZE
protected software.amazon.awssdk.core.internal.io.UnderlyingStreamBuffer
underlyingStreamBuffer
Iterator on the buffer of the underlying stream, Null if the wrapped stream is marksupported, otherwise it will be initialized when this wrapper is marked.
-
Constructor Summary
Constructors Constructor Description AwsChunkedInputStream()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected InputStream
getWrappedInputStream()
Returns the underlying input stream, if any, from the subclass; or null if there is no underlying input stream.boolean
markSupported()
int
read()
long
skip(long n)
-
Methods inherited from class software.amazon.awssdk.core.io.SdkInputStream
abort, abortIfNeeded, release
-
-
-
-
Field Detail
-
DEFAULT_CHUNK_SIZE
public static final int DEFAULT_CHUNK_SIZE
- See Also:
- Constant Field Values
-
SKIP_BUFFER_SIZE
protected static final int SKIP_BUFFER_SIZE
- See Also:
- Constant Field Values
-
log
protected static final Logger log
-
is
protected InputStream is
-
currentChunkIterator
protected software.amazon.awssdk.core.internal.io.ChunkContentIterator currentChunkIterator
Iterator on the current chunk.
-
underlyingStreamBuffer
protected software.amazon.awssdk.core.internal.io.UnderlyingStreamBuffer underlyingStreamBuffer
Iterator on the buffer of the underlying stream, Null if the wrapped stream is marksupported, otherwise it will be initialized when this wrapper is marked.
-
isAtStart
protected boolean isAtStart
-
isTerminating
protected boolean isTerminating
-
-
Method Detail
-
read
public int read() throws IOException
- Specified by:
read
in classInputStream
- Throws:
IOException
-
skip
public long skip(long n) throws IOException
- Overrides:
skip
in classInputStream
- Throws:
IOException
-
markSupported
public boolean markSupported()
- Overrides:
markSupported
in classInputStream
- See Also:
InputStream.markSupported()
-
getWrappedInputStream
protected InputStream getWrappedInputStream()
Description copied from class:SdkInputStream
Returns the underlying input stream, if any, from the subclass; or null if there is no underlying input stream.- Specified by:
getWrappedInputStream
in classSdkInputStream
-
-