Summary
Implements a stream whose synchronous read/write operations respect the
Stream.ReadTimeoutand
Stream.WriteTimeout
properties. Useful for wrapping streams which do not directly support these properties.
Constructors
Instance methods
void | | Flushes the underlying stream. |
int | Read(byte[] buffer, int offset, int count) |
Reads up to count bytes into buffer starting at offset
from the underlying stream, if it supports this. Will block waiting for the read to complete for at most Stream.ReadTimeout
milliseconds; afterwards, a TimeoutException is thrown.
|
long | Seek(long offset, SeekOrigin origin) | Seeks to the specified position in the underlying stream, if the underlying stream supports it. |
void | | Sets the length of the underlying stream, if supported by it. |
void | Write(byte[] buffer, int offset, int count) |
Writes count bytes from buffer starting at offset
to the underlying stream, if it supports this. Will block waiting for the write to complete for at most Stream.WriteTimeout
milliseconds; afterwards, a TimeoutException is thrown.
|
Instance properties
bool | | Indicates whether the underlying stream, and hence this stream, supports reading. |
bool | | Indicates whether the underlying stream, and hence this stream, supports seeking. |
bool | | Always returns true. |
bool | | Indicates whether the underlying stream, and hence this stream, supports writing. |
long | | Gets the length of the underlying stream, if supported by it. |
long | | Gets or sets the current position in the stream, if supported by the underlying stream. |
int | |
Gets or sets a value, in miliseconds, that determines how long the stream will attempt to read before timing out.
Specify Timeout.Infinite to suppress the time-out (which is the default value).
|
int | |
Gets or sets a value, in miliseconds, that determines how long the stream will attempt to write before timing out.
Specify Timeout.Infinite to suppress the time-out (which is the default value).
|