TruncatedStream is a read-only stream wrapper that will not read past the specified length.
public sealed class TruncatedStream : WrappingStreamBase
| name | description |
|---|---|
| TruncatedStream(…) | Creates a new truncated stream. |
| override CanWrite { get; } | Returns false; writes are not supported. |
| override Length { get; } | Returns the (truncated) length of the stream. |
| override Position { get; set; } | The current position in the stream. |
| override Flush() | Throws an exception; writes are not supported. |
| override Read(…) | Reads from the stream. |
| override ReadAsync(…) | Reads from the stream asynchronously. (2 methods) |
| override ReadByte() | Reads a byte from the stream. |
| override Seek(…) | Changes the current position in the stream. |
| override SetLength(…) | Throws an exception; writes are not supported. |
| override Write(…) | Throws an exception; writes are not supported. |
| override WriteAsync(…) | Asynchronously writes a sequence of bytes to the current stream, advances the current position within this stream by the number of bytes written, and monitors cancellation requests. (2 methods) |