AwsChunkedByteReadChannelTestBase

Constructors

Link copied to clipboard
constructor()

Inherited properties

Functions

Inherited functions

Link copied to clipboard
fun encodedChunkLength(chunkSize: Int): Int

Given the length of the chunk body, returns the length of the entire encoded chunk. The chunk encoding structure is as follows: String(Hex(CHUNK_SIZE));chunk-signature=<64 bytes>\r\n \r\n

Link copied to clipboard
Link copied to clipboard

Given a string representation of aws-chunked encoded bytes, return a list of the chunk signatures as strings. Chunk signatures are defined by the following grammar: chunk-signature=<64 alphanumeric characters>

Link copied to clipboard
fun getChunkSizes(bytes: String, isUnsignedChunk: Boolean = false): List<Int>

Given a string representation of aws-chunked encoded bytes, returns a list of the chunk sizes as integers. Chunk sizes are defined by the following grammar: String(Hex(ChunkSize));chunk-signature=

Link copied to clipboard

Given a string representation of aws-chunked encoded bytes, return the value of the x-amz-trailer-signature trailing header.

Link copied to clipboard
suspend fun getTrailingHeadersLength(trailingHeaders: DeferredHeaders, isUnsignedChunk: Boolean = false): Int

Calculates the aws-chunked encoded trailing header length Used to calculate how many bytes should be read for all the trailing headers to be consumed

Link copied to clipboard
fun testReadExactBytes(): TestResult
Link copied to clipboard
fun testReadExcessiveBytes(): TestResult
Link copied to clipboard
fun testReadFewerBytes(): TestResult
Link copied to clipboard
fun testReadMultipleFullChunks(): TestResult
Link copied to clipboard
fun testReadNegativeOffset(): TestResult
Link copied to clipboard
fun testReadWithTrailingHeaders(): TestResult
Link copied to clipboard
fun testUnsignedChunk(): TestResult