A stream of zeroes.
public class ZeroStream : Stream
name | description |
---|---|
ZeroStream() | Initializes a new instance of the ZeroStream class. |
ZeroStream(…) | Initializes a new instance of the ZeroStream class. |
override CanRead { get; } | Returns whether the current stream supports reading. |
override CanSeek { get; } | Returns whether the current stream supports seeking. |
override CanWrite { get; } | Returns whether the current stream supports writing. |
override Length { get; } | Gets the length in bytes of the stream. |
override Position { get; set; } | Gets or sets the position within the current stream. |
override Flush() | Flushes the stream. |
override Read(…) | Reads zeroes from the current stream and advances the position within the stream by the number of bytes read. |
override Seek(…) | Sets the position within the current stream. |
override SetLength(…) | Sets the length of the current stream. |
override Write(…) | Writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written. |
The stream tracks position and length like any stream, but any bytes written to the stream will be read as zeroes.