Method | Description | |
---|---|---|
Flush ( ) : void |
Clears all buffers for this stream and causes any buffered data to be written to the underlying device.
|
|
Read ( byte buffer, int offset, int count ) : int |
Reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read.
|
|
Seek ( long offset, SeekOrigin origin ) : long |
Sets the position within the current stream.
|
|
SetLength ( long value ) : void |
Sets the length of the current stream.
|
|
ThrottledStream ( Stream baseStream ) : System |
Initializes a new instance of the T:ThrottledStream class with an infinite amount of bytes that can be processed.
|
|
ThrottledStream ( Stream baseStream, long maximumBytesPerSecond ) : System |
Initializes a new instance of the T:ThrottledStream class.
|
|
ToString ( ) : string |
Returns a
|
|
Write ( byte buffer, int offset, int count ) : void |
Writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.
|
Method | Description | |
---|---|---|
Reset ( ) : void |
Will reset the bytecount to 0 and reset the start time to the current time.
|
|
Throttle ( int bufferSizeInBytes ) : void |
Throttles for the specified buffer size in bytes.
|
public Read ( byte buffer, int offset, int count ) : int | ||
buffer | byte | An array of bytes. When this method returns, the buffer contains the specified byte array with the values between offset and (offset + count - 1) replaced by the bytes read from the current source. |
offset | int | The zero-based byte offset in buffer at which to begin storing the data read from the current stream. |
count | int | The maximum number of bytes to be read from the current stream. |
return | int |
public Seek ( long offset, SeekOrigin origin ) : long | ||
offset | long | A byte offset relative to the origin parameter. |
origin | SeekOrigin | A value of type |
return | long |
public SetLength ( long value ) : void | ||
value | long | The desired length of the current stream in bytes. |
return | void |
protected Throttle ( int bufferSizeInBytes ) : void | ||
bufferSizeInBytes | int | The buffer size in bytes. |
return | void |
public ThrottledStream ( Stream baseStream ) : System | ||
baseStream | Stream | The base stream. |
return | System |
public ThrottledStream ( Stream baseStream, long maximumBytesPerSecond ) : System | ||
baseStream | Stream | The base stream. |
maximumBytesPerSecond | long | The maximum bytes per second that can be transferred through the base stream. |
return | System |
public Write ( byte buffer, int offset, int count ) : void | ||
buffer | byte | An array of bytes. This method copies count bytes from buffer to the current stream. |
offset | int | The zero-based byte offset in buffer at which to begin copying bytes to the current stream. |
count | int | The number of bytes to be written to the current stream. |
return | void |