C# Class CmisSync.Lib.Streams.BandwidthLimitedStream

Bandwidth limited stream.
Inheritance: NotifyPropertyChangedStream
Mostrar archivo Open project: OpenDataSpace/CmisSync Class Usage Examples

Public Methods

Method Description
BandwidthLimitedStream ( Stream s ) : System

Initializes a new instance of the CmisSync.Lib.Streams.BandwidthLimitedStream class.

BandwidthLimitedStream ( Stream s, long limit ) : System

Initializes a new instance of the CmisSync.Lib.Streams.BandwidthLimitedStream class.

DisableLimits ( ) : void

Disables the limits.

DisableReadLimit ( ) : void

Disables the read limit.

DisableWriteLimit ( ) : void

Disables the write limit.

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

Read the specified buffer, offset and count.

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

Write the specified buffer, offset and count.

Private Methods

Method Description
Init ( ) : void

Init this instance.

Method Details

BandwidthLimitedStream() public method

Initializes a new instance of the CmisSync.Lib.Streams.BandwidthLimitedStream class.
public BandwidthLimitedStream ( Stream s ) : System
s Stream /// The stream instance, which should be limited. ///
return System

BandwidthLimitedStream() public method

Initializes a new instance of the CmisSync.Lib.Streams.BandwidthLimitedStream class.
public BandwidthLimitedStream ( Stream s, long limit ) : System
s Stream /// The stream instance, which should be limited. ///
limit long /// Up and download limit. ///
return System

DisableLimits() public method

Disables the limits.
public DisableLimits ( ) : void
return void

DisableReadLimit() public method

Disables the read limit.
public DisableReadLimit ( ) : void
return void

DisableWriteLimit() public method

Disables the write limit.
public DisableWriteLimit ( ) : void
return void

Read() public method

Read the specified buffer, offset and count.
public Read ( byte buffer, int offset, int count ) : int
buffer byte /// Target buffer. ///
offset int /// Offset. ///
count int /// Count of bytes. ///
return int

Write() public method

Write the specified buffer, offset and count.
public Write ( byte buffer, int offset, int count ) : void
buffer byte /// Buffer. ///
offset int /// Offset. ///
count int /// Count. ///
return void