C# Class Amazon.Runtime.Internal.Util.ChunkedUploadWrapperStream

Stream wrapper that double-buffers from a wrapped stream and returns the buffered content as a series of signed 'chunks' for the AWS4 ('Signature V4') protocol.
Inheritance: WrapperStream
Datei anzeigen Open project: aws/aws-sdk-net

Public Properties

Property Type Description
DefaultChunkSize int

Private Properties

Property Type Description
CalculateChunkHeaderLength long
ChunkedUploadWrapperStream System
ConstructOutputBufferChunk void
FillInputBuffer int

Public Methods

Method Description
ComputeChunkedContentLength ( long originalLength ) : long

Computes the total size of the data payload, including the chunk metadata. Called externally so as to be able to set the correct Content-Length header value.

Read ( byte buffer, int offset, int count ) : int

Reads some or all of the processed chunk to the consumer, constructing and streaming a new chunk if more input data is available.

Private Methods

Method Description
CalculateChunkHeaderLength ( long chunkDataSize ) : long

Computes the size of the header data for each chunk.

ChunkedUploadWrapperStream ( Stream stream, int wrappedStreamBufferSize, AWS4SigningResult headerSigningResult ) : System
ConstructOutputBufferChunk ( int dataLen ) : void

Computes the derived signature for a chunk of data of given length in the input buffer, placing a formatted chunk with headers, signature and data into the output buffer ready for streaming back to the consumer.

FillInputBuffer ( ) : int

Attempt to read sufficient data for a whole chunk from the wrapped stream, returning the number of bytes successfully read to be processed into a chunk

Method Details

ComputeChunkedContentLength() public static method

Computes the total size of the data payload, including the chunk metadata. Called externally so as to be able to set the correct Content-Length header value.
public static ComputeChunkedContentLength ( long originalLength ) : long
originalLength long
return long

Read() public method

Reads some or all of the processed chunk to the consumer, constructing and streaming a new chunk if more input data is available.
public Read ( byte buffer, int offset, int count ) : int
buffer byte
offset int
count int
return int

Property Details

DefaultChunkSize public_oe static_oe property

public static int DefaultChunkSize
return int