Class AwsUnsignedChunkedDecodingChecksumInputStream

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

    
    public final class AwsUnsignedChunkedDecodingChecksumInputStream
    extends AbstractAwsInputStream
                        

    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:

    <pre> 24 ## sample test file ## demo=content 0 x-amz-checksum-sha256:1VcEifAruhjVvjzul4sC0B1EmlUdzqvsp6BP0KSVdTE= </pre>

    The format of each chunk of data is:

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

    The format of the full payload is:

    <pre> [hex-encoded-number-of-bytes-in-chunk][EOL] [payload-bytes-of-this-chunk][EOL] 0[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

      • AwsUnsignedChunkedDecodingChecksumInputStream

        AwsUnsignedChunkedDecodingChecksumInputStream(InputStream source, Long decodedLength)