|
Joutsen v0.5.0+12-g5dd5f7e
|
A stream that provides only readonly funcionality. More...
Public Member Functions | |
| ReadOnlyStream (Stream stream) | |
| Creates a new readonly instance of a stream. More... | |
| override void | Flush () |
| Flushes what was written to the stream. More... | |
| override int | Read (byte[] buffer, int offset, int count) |
| Reads a sequence of bytes from the stream into a buffer. More... | |
| override long | Seek (long offset, SeekOrigin origin) |
| Changes the current position within the stream. More... | |
| override void | SetLength (long value) |
| Changes the length of the stream. More... | |
| override void | Write (byte[] buffer, int offset, int count) |
| Writes to the stream. More... | |
| override IAsyncResult | BeginWrite (byte[] buffer, int offset, int count, AsyncCallback callback, object state) |
| Writes to the stream asynchronously. More... | |
| override void | EndWrite (IAsyncResult asyncResult) |
| Ends writing to the stream asynchrounously. More... | |
| override void | WriteByte (byte value) |
| Writes a single byte to the stream. More... | |
| override Task | WriteAsync (byte[] buffer, int offset, int count, CancellationToken cancellationToken) |
| Writes to the stream asynchronously. More... | |
| override Task | FlushAsync (CancellationToken cancellationToken) |
| Flushes the write buffer of the stream. More... | |
| override void | Close () |
| Closes the stream preventing further use of it. More... | |
Protected Member Functions | |
| override void | Dispose (bool disposing) |
| Disposes of resources used by the stream. More... | |
| void | CheckIfStreamIsClosed () |
| Checks if the stream is already closed. More... | |
Properties | |
| override bool | CanRead [get] |
| Checks if the stream can be read. More... | |
| override bool | CanSeek [get] |
| Checks if it is possible to seek in the stream or if it can only be read in sequence. More... | |
| override bool | CanWrite [get] |
| Checks if the stream is writable. More... | |
| override long | Length [get] |
| Checks the length of the stream. More... | |
| override long | Position [get, set] |
| Checks or sets the current position in the stream. More... | |
A stream that provides only readonly funcionality.
| Joutsen.IO.ReadOnlyStream.ReadOnlyStream | ( | Stream | stream | ) |
Creates a new readonly instance of a stream.
| override IAsyncResult Joutsen.IO.ReadOnlyStream.BeginWrite | ( | byte[] | buffer, |
| int | offset, | ||
| int | count, | ||
| AsyncCallback | callback, | ||
| object | state | ||
| ) |
Writes to the stream asynchronously.
This method is not supported.
| NotSupportedException | whenever the method is called |
|
protected |
Checks if the stream is already closed.
| IOException | if the stream is closed |
| override void Joutsen.IO.ReadOnlyStream.Close | ( | ) |
Closes the stream preventing further use of it.
|
protected |
Disposes of resources used by the stream.
This also closes the stream.
| override void Joutsen.IO.ReadOnlyStream.EndWrite | ( | IAsyncResult | asyncResult | ) |
Ends writing to the stream asynchrounously.
This method is not supported.
| NotSupportedException | whenever the method is called |
| override void Joutsen.IO.ReadOnlyStream.Flush | ( | ) |
Flushes what was written to the stream.
This operation is not supported.
| NotSupportedException | whenever the method is called |
| override Task Joutsen.IO.ReadOnlyStream.FlushAsync | ( | CancellationToken | cancellationToken | ) |
Flushes the write buffer of the stream.
This method is not supported.
| NotSupportedException | whenever the method is called |
| override int Joutsen.IO.ReadOnlyStream.Read | ( | byte[] | buffer, |
| int | offset, | ||
| int | count | ||
| ) |
Reads a sequence of bytes from the stream into a buffer.
| buffer | the buffer |
| offset | the start offset of the buffer |
| count | the maximum number of bytes to read |
| IOException | if the stream is closed |
| override long Joutsen.IO.ReadOnlyStream.Seek | ( | long | offset, |
| SeekOrigin | origin | ||
| ) |
Changes the current position within the stream.
| offset | the new position in the stream |
| origin | the way to interpret the offset, from the beginning, end or current position |
| IOException | if the stream is closed |
| override void Joutsen.IO.ReadOnlyStream.SetLength | ( | long | value | ) |
Changes the length of the stream.
This method is not supported.
| NotSupportedException | whenever the method is called |
| override void Joutsen.IO.ReadOnlyStream.Write | ( | byte[] | buffer, |
| int | offset, | ||
| int | count | ||
| ) |
Writes to the stream.
This method is not supported.
| NotSupportedException | whenever the method is called |
| override Task Joutsen.IO.ReadOnlyStream.WriteAsync | ( | byte[] | buffer, |
| int | offset, | ||
| int | count, | ||
| CancellationToken | cancellationToken | ||
| ) |
Writes to the stream asynchronously.
This method is not supported.
| NotSupportedException | whenever the method is called |
| override void Joutsen.IO.ReadOnlyStream.WriteByte | ( | byte | value | ) |
Writes a single byte to the stream.
This method is not supported.
| NotSupportedException | whenever the method is called |
|
get |
Checks if the stream can be read.
|
get |
Checks if it is possible to seek in the stream or if it can only be read in sequence.
|
get |
Checks if the stream is writable.
This is always fals.
|
get |
Checks the length of the stream.
| IOException | if the stream is closed |
|
getset |
Checks or sets the current position in the stream.
| IOException | if the stream is closed |