Package com.adobe.testing.s3mock.util
Class AwsUnsignedChunkedDecodingChecksumInputStream
java.lang.Object
java.io.InputStream
com.adobe.testing.s3mock.util.AbstractAwsInputStream
com.adobe.testing.s3mock.util.AwsUnsignedChunkedDecodingChecksumInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
Merges chunks from AWS chunked AwsUnsignedChunkedEncodingInputStream.
The checksum is optionally included in the stream as part of the "trail headers"
after the last chunk.
The original stream looks like this:
24 ## sample test file ## demo=content 0 x-amz-checksum-sha256:1VcEifAruhjVvjzul4sC0B1EmlUdzqvsp6BP0KSVdTE=
The format of each chunk of data is:
[hex-encoded-number-of-bytes-in-chunk][EOL] [payload-bytes-of-this-chunk][EOL]
The format of the full payload is:
[hex-encoded-number-of-bytes-in-chunk][EOL] [payload-bytes-of-this-chunk][EOL] 0[EOL] x-amz-checksum-[checksum-algoritm]:[checksum][EOL] [other trail headers]
- See Also:
-
Field Summary
Fields inherited from class com.adobe.testing.s3mock.util.AbstractAwsInputStream
algorithm, checksum, CHECKSUM_HEADER, chunkLength, chunks, CRLF, decodedLength, DELIMITER, readDecodedLength, source -
Constructor Summary
ConstructorsConstructorDescriptionAwsUnsignedChunkedDecodingChecksumInputStream(InputStream source, long decodedLength) -
Method Summary
Methods inherited from class com.adobe.testing.s3mock.util.AbstractAwsInputStream
close, endsWith, extractAlgorithmAndChecksum, getAlgorithm, getChecksum, readUntil, setChunkLengthMethods inherited from class java.io.InputStream
available, mark, markSupported, nullInputStream, read, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Constructor Details
-
AwsUnsignedChunkedDecodingChecksumInputStream
-
-
Method Details
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-