private static long calculateSignedChunkLength(long chunkDataSize) {
        return Long.toHexString(chunkDataSize).length()
                + CHUNK_SIGNATURE_HEADER.length()
                + SIGNATURE_LENGTH
                + CRLF.length()
                + chunkDataSize
                + CRLF.length();
    }
Reset the stream, either by resetting the wrapped stream or using the
buffer created by this class.
aws-java-sdk-s3/src/main/java/com/amazonaws/auth/AwsChunkedEncodingInputStream.java