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.ChunkContentIteratorcurrentChunkIteratorIterator on the current chunk.static intDEFAULT_CHUNK_SIZEprotected InputStreamisprotected booleanisAtStartprotected booleanisTerminatingprotected static software.amazon.awssdk.utils.Loggerlogprotected static intSKIP_BUFFER_SIZEprotected software.amazon.awssdk.core.internal.io.UnderlyingStreamBufferunderlyingStreamBufferIterator 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 InputStreamgetWrappedInputStream()Returns the underlying input stream, if any, from the subclass; or null if there is no underlying input stream.booleanmarkSupported()intread()longskip(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 software.amazon.awssdk.utils.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:
readin classInputStream- Throws:
IOException
-
skip
public long skip(long n) throws IOException- Overrides:
skipin classInputStream- Throws:
IOException
-
markSupported
public boolean markSupported()
- Overrides:
markSupportedin classInputStream- See Also:
InputStream.markSupported()
-
getWrappedInputStream
protected InputStream getWrappedInputStream()
Description copied from class:SdkInputStreamReturns the underlying input stream, if any, from the subclass; or null if there is no underlying input stream.- Specified by:
getWrappedInputStreamin classSdkInputStream
-
-