public abstract class AwsChunkedEncodingInputStream extends AwsChunkedInputStream
| Modifier and Type | Class and Description |
|---|---|
protected static class |
AwsChunkedEncodingInputStream.Builder<T extends AwsChunkedEncodingInputStream.Builder> |
| Modifier and Type | Field and Description |
|---|---|
protected byte[] |
calculatedChecksum |
protected String |
checksumHeaderForTrailer |
protected static String |
CRLF |
protected static byte[] |
FINAL_CHUNK |
protected static String |
HEADER_COLON_SEPARATOR |
protected boolean |
isTrailingTerminated |
currentChunkIterator, DEFAULT_CHUNK_SIZE, is, isAtStart, isTerminating, log, SKIP_BUFFER_SIZE, underlyingStreamBuffer| Modifier | Constructor and Description |
|---|---|
protected |
AwsChunkedEncodingInputStream(InputStream in,
SdkChecksum sdkChecksum,
String checksumHeaderForTrailer,
AwsChunkedEncodingConfig config)
Creates a chunked encoding input stream initialized with the originating stream.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract byte[] |
createChecksumChunkHeader() |
protected abstract byte[] |
createChunk(byte[] chunkData)
Creates chunk for the given buffer.
|
protected abstract byte[] |
createFinalChunk(byte[] finalChunk)
The final chunk.
|
void |
mark(int readlimit)
The readlimit parameter is ignored.
|
int |
read(byte[] b,
int off,
int len) |
void |
reset()
Reset the stream, either by resetting the wrapped stream or using the
buffer created by this class.
|
getWrappedInputStream, markSupported, read, skipabort, abortIfNeeded, releaseavailable, close, readclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitreleaseprotected static final String CRLF
protected static final byte[] FINAL_CHUNK
protected static final String HEADER_COLON_SEPARATOR
protected byte[] calculatedChecksum
protected final String checksumHeaderForTrailer
protected boolean isTrailingTerminated
protected AwsChunkedEncodingInputStream(InputStream in, SdkChecksum sdkChecksum, String checksumHeaderForTrailer, AwsChunkedEncodingConfig config)
in - The original InputStream.config - The configuration allows the user to customize chunk size and buffer size.
See AwsChunkedEncodingConfig for default values.public int read(byte[] b,
int off,
int len)
throws IOException
read in class InputStreamIOExceptionpublic void mark(int readlimit)
mark in class InputStreampublic void reset()
throws IOException
reset in class InputStreamIOExceptionprotected abstract byte[] createFinalChunk(byte[] finalChunk)
finalChunk - The last byte which will be often 0 byte.protected abstract byte[] createChunk(byte[] chunkData)
chunkData - The chunk of original data.protected abstract byte[] createChecksumChunkHeader()
Copyright © 2023. All rights reserved.