public final class ChunkContentUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
CRLF |
static String |
HEADER_COLON_SEPARATOR |
static String |
ZERO_BYTE |
| Modifier and Type | Method and Description |
|---|---|
static long |
calculateChecksumContentLength(Algorithm algorithm,
String headerName)
Calculates the content length for a given Algorithm and header name.
|
static long |
calculateChunkLength(long originalContentLength) |
static ByteBuffer |
createChecksumTrailer(String computedChecksum,
String trailerHeader)
Creates Chunk encoded checksum trailer for a computedChecksum which is in Base64 encoded.
|
static ByteBuffer |
createChunk(ByteBuffer chunkData,
boolean isLastByte)
Creates ChunkEncoded data for an given chunk data.
|
public static final String HEADER_COLON_SEPARATOR
public static final String ZERO_BYTE
public static final String CRLF
public static long calculateChunkLength(long originalContentLength)
originalContentLength - Original Content length.public static long calculateChecksumContentLength(Algorithm algorithm, String headerName)
algorithm - Algorithm used.headerName - Header name.public static ByteBuffer createChecksumTrailer(String computedChecksum, String trailerHeader)
computedChecksum - Base64 encoded computed checksum.trailerHeader - Header for the checksum data in the trailer.public static ByteBuffer createChunk(ByteBuffer chunkData, boolean isLastByte)
chunkData - chunk data that needs to be converted to chunk encoded format.isLastByte - if true then additional CRLF will not be appended.Copyright © 2023. All rights reserved.