Package com.adobe.testing.s3mock.util
Class AwsChunkedDecodingChecksumInputStream
java.lang.Object
java.io.InputStream
com.adobe.testing.s3mock.util.AwsChecksumInputStream
com.adobe.testing.s3mock.util.AwsChunkedDecodingChecksumInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final byte[]protected static final byte[]protected longprotected final InputStreamFields inherited from class com.adobe.testing.s3mock.util.AwsChecksumInputStream
algorithm, checksum, CHECKSUM_HEADER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected booleanendsWith(ByteBuffer buffer, byte[] endSequence) intread()protected byte[]readUntil(byte[] endSequence) Reads this stream until the byte sequence was found.protected voidsetPayloadLength(byte[] hexLengthBytes) Methods inherited from class com.adobe.testing.s3mock.util.AwsChecksumInputStream
extractAlgorithmAndChecksum, getAlgorithm, getChecksumMethods inherited from class java.io.InputStream
available, mark, markSupported, nullInputStream, read, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Field Details
-
CRLF
protected static final byte[] CRLF -
DELIMITER
protected static final byte[] DELIMITER -
source
-
payloadLength
protected long payloadLength
-
-
Constructor Details
-
AwsChunkedDecodingChecksumInputStream
-
-
Method Details
-
read
- Overrides:
readin classAwsChecksumInputStream- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-
readUntil
Reads this stream until the byte sequence was found.- Parameters:
endSequence- The byte sequence to look for in the stream. The source stream is read until the last bytes read are equal to this sequence.- Returns:
- The bytes read before the end sequence started.
- Throws:
IOException
-
endsWith
-
setPayloadLength
protected void setPayloadLength(byte[] hexLengthBytes)
-