C# Class Cimbalino.Phone.Toolkit.Helpers.ChunkedStream

Creates a stream that helps dividing data in fixed size chunks.
Inheritance: Stream
Mostrar archivo Open project: Cimbalino/Cimbalino-Phone-Toolkit Class Usage Examples

Public Methods

Method Description
ChunkedStream ( int chunkSize, Action chunkReadyAction ) : System

Initializes a new instance of the ChunkedStream class.

Close ( ) : void

Closes the current stream and releases all resources.

Flush ( ) : void

Overrides Stream.Flush so that no action is performed.

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

This method is not supported.

Seek ( long offset, SeekOrigin origin ) : long

This method is not supported.

SetLength ( long value ) : void

This method is not supported.

Write ( byte buffer, int offset, int count ) : void

Writes a block of bytes to the current stream using data read from a buffer.

Private Methods

Method Description
SendChunks ( ) : void

Method Details

ChunkedStream() public method

Initializes a new instance of the ChunkedStream class.
public ChunkedStream ( int chunkSize, Action chunkReadyAction ) : System
chunkSize int The chunk size.
chunkReadyAction Action The to perform when a chunk is ready.
return System

Close() public method

Closes the current stream and releases all resources.
public Close ( ) : void
return void

Flush() public method

Overrides Stream.Flush so that no action is performed.
public Flush ( ) : void
return void

Read() public method

This method is not supported.
public Read ( byte buffer, int offset, int count ) : int
buffer byte The buffer.
offset int The offset.
count int The count.
return int

Seek() public method

This method is not supported.
public Seek ( long offset, SeekOrigin origin ) : long
offset long The offset.
origin SeekOrigin The origin.
return long

SetLength() public method

This method is not supported.
public SetLength ( long value ) : void
value long The value.
return void

Write() public method

Writes a block of bytes to the current stream using data read from a buffer.
public Write ( byte buffer, int offset, int count ) : void
buffer byte The buffer to write data from.
offset int The zero-based byte offset in at which to begin copying bytes to the current stream.
count int The maximum number of bytes to write.
return void