public final class AwsSignedChunkedEncodingInputStream extends AwsChunkedEncodingInputStream
Modifier and Type | Class and Description |
---|---|
static class |
AwsSignedChunkedEncodingInputStream.Builder |
calculatedChecksum, checksumHeaderForTrailer, DEFAULT_CHUNK_SIZE, FINAL_CHUNK, HEADER_COLON_SEPARATOR, isTrailingTerminated, SKIP_BUFFER_SIZE
Modifier and Type | Method and Description |
---|---|
static AwsSignedChunkedEncodingInputStream.Builder |
builder() |
static int |
calculateChecksumContentLength(Algorithm algorithm,
String headerName,
int signatureLength) |
static long |
calculateStreamContentLength(long originalLength,
int signatureLength,
AwsChunkedEncodingConfig config) |
static long |
calculateStreamContentLength(long originalLength,
int signatureLength,
AwsChunkedEncodingConfig config,
boolean isTrailingChecksumCalculated)
Calculates the expected total length of signed payload chunked stream.
|
protected byte[] |
createChecksumChunkHeader() |
protected byte[] |
createChunk(byte[] chunkData) |
protected byte[] |
createFinalChunk(byte[] finalChunk) |
void |
reset() |
getWrappedInputStream, mark, markSupported, read, read, skip
abort, abortIfNeeded, release
available, close, read
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
release
public static AwsSignedChunkedEncodingInputStream.Builder builder()
public static long calculateStreamContentLength(long originalLength, int signatureLength, AwsChunkedEncodingConfig config)
public static long calculateStreamContentLength(long originalLength, int signatureLength, AwsChunkedEncodingConfig config, boolean isTrailingChecksumCalculated)
originalLength
- The length of the datasignatureLength
- The length of a calculated signature, dependent on which AwsChunkSigner
is usedconfig
- The chunked encoding config determines the size of the chunks. Use the same values as when
initializing the stream.protected byte[] createFinalChunk(byte[] finalChunk)
createFinalChunk
in class AwsChunkedEncodingInputStream
protected byte[] createChunk(byte[] chunkData)
createChunk
in class AwsChunkedEncodingInputStream
protected byte[] createChecksumChunkHeader()
createChecksumChunkHeader
in class AwsChunkedEncodingInputStream
public static int calculateChecksumContentLength(Algorithm algorithm, String headerName, int signatureLength)
public void reset() throws IOException
reset
in class AwsChunkedEncodingInputStream
IOException
Copyright © 2023. All rights reserved.