A stream is a sequence of bytes.
There is an abstract class named Stream
that represents a stream. There are many classes that inherit from this base class, so they all work the same way. In the following table are some of the common members of the Stream
class:
Member |
Description |
|
This determines whether you can read from and write to the stream |
|
This determines the total number of bytes and the current position within the stream |
|
This closes the stream and releases its resources |
|
If the stream has a buffer, then it is cleared and written to the underlying stream |
|
This reads a specified number of bytes from the stream into a byte array and advances the position |
|
This reads the next byte from the stream and advances the position |
|
This moves the position to the specified position (if CanSeek is true) |
|
This writes the... |