Class AwsChunkedDecodingChecksumInputStream

  • All Implemented Interfaces:
    java.io.Closeable , java.lang.AutoCloseable

    
    public final class AwsChunkedDecodingChecksumInputStream
    extends AbstractAwsInputStream
                        

    Merges chunks from AWS chunked AwsChunkedEncodingInputStream, skipping V4 style signing metadata. The checksum is optionally included in the stream as part of the "trail headers" after the last chunk.

    The original stream looks like this:

    <pre> 24;chunk-signature=312a41de690364ad6d17629d1e026c448e78abd328f1602276fdd2c3f928d100 ## sample test file ## demo=content 0;chunk-signature=4d2b448448f29b473beb81340f5a3d6c9468e4fbb9ac761cfab63846919011fb x-amz-checksum-sha256:1VcEifAruhjVvjzul4sC0B1EmlUdzqvsp6BP0KSVdTE= </pre>

    The format of each chunk of data is:

    <pre> [hex-encoded-number-of-bytes-in-chunk];chunk-signature=[sha256-signature][EOL] [payload-bytes-of-this-chunk][EOL] </pre>

    The format of the full payload is:

    <pre> [hex-encoded-number-of-bytes-in-chunk];chunk-signature=[sha256-signature][EOL] [payload-bytes-of-this-chunk][EOL] 0;chunk-signature=[sha256-signature][EOL] x-amz-checksum-[checksum-algorithm]:[checksum][EOL] [other trail headers] </pre>
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      Integer read()
      • Methods inherited from class com.adobe.testing.s3mock.s3.util.AbstractAwsInputStream

        close, getAlgorithm, getChecksum, getChunks, getDecodedLength, getReadDecodedLength, read
      • Methods inherited from class java.io.InputStream

        available, mark, markSupported, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AwsChunkedDecodingChecksumInputStream

        AwsChunkedDecodingChecksumInputStream(InputStream source, Long decodedLength)