Package com.adobe.testing.s3mock.util
Class AwsChunkDecodingInputStream
- java.lang.Object
-
- java.io.InputStream
-
- com.adobe.testing.s3mock.util.AwsChunkDecodingInputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
public class AwsChunkDecodingInputStream extends java.io.InputStreamSkips V4 style signing metadata from input streams.The original stream looks like this (newlines are CRLF):
5;chunk-signature=7ece820edcf094ce1ef6d643c8db60b67913e28831d9b0430efd2b56a9deec5e 12345 0;chunk-signature=ee2c094d7162170fcac17d2c76073cd834b0488bfe52e89e48599b8115c7ffa2
The format of each chunk of data is:
[hex-encoded-number-of-bytes-in-chunk];chunk-signature=[sha256-signature][crlf] [payload-bytes-of-this-chunk][crlf]
- See Also:
- AwsChunkedEncodingInputStream
-
-
Constructor Summary
Constructors Constructor Description AwsChunkDecodingInputStream(java.io.InputStream source)Constructs a newAwsChunkDecodingInputStream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()intread()
-
-
-
Constructor Detail
-
AwsChunkDecodingInputStream
public AwsChunkDecodingInputStream(java.io.InputStream source)
Constructs a newAwsChunkDecodingInputStream.- Parameters:
source- TheInputStreamto wrap.
-
-
Method Detail
-
read
public int read() throws java.io.IOException- Specified by:
readin classjava.io.InputStream- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classjava.io.InputStream- Throws:
java.io.IOException
-
-