Class UnsignedChunksInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
Currently, the only valid value of x-amz-content-sha256 header to indicate transfer unsigned payload in multiple chunks is STREAMING-UNSIGNED-PAYLOAD-TRAILER. Therefore, the input stream should work with chunked payloads with checksum trailer. Nevertheless, this input stream also supports chunked upload without trailer.
Example chunk data:
10000\r\n <65536-bytes>\r\n 0\r\n x-amz-checksum-crc64nvme:2wstOANdZ/o=\r\n
The 10000 will be read and decoded from base-16 representation to 65536, which is the size of the subsequent chunk payload. Each chunk upload ends with a zero-byte final additional chunk. At the end, there will be a trailer checksum payload
The logic is similar to SignedChunksInputStream, but since it is an unsigned chunked upload
there is no "chunk-signature" to parse.
Note that there is not actual trailer checksum verification taking place. The InputStream only returns the actual chunk payload from chunked signatures format.
Reference:-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.io.InputStream
available, close, mark, markSupported, read, reset, skip
-
Constructor Details
-
UnsignedChunksInputStream
-
-
Method Details
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-