Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Nested class: RT.KitchenSink.Streams.PeekableStream.PeekStream

Summary

Reads on this stream are implemented as peeking into the parent stream. That is, the position of the parent stream is unaffected when this stream is used to peek ahead of the current position in the parent stream.

Instance methods

void
  • Overrides: Stream.Flush()
Does nothing.
int
Read(byte[] buffer, int offset, int count)
  • Overrides: Stream.Read(byte[], int, int)
Peeks at most the specified number of bytes from the parent stream. Because the peek stream maintains its own position, subsequent calls to this method will peek further and further into the parent stream. Note however that direct operations on the parent's underlying stream can break the sequence, and that some calls on the parent stream will reset this position. All such calls are documented to this effect.
long
Seek(long offset, SeekOrigin origin)
  • Overrides: Stream.Seek(long, SeekOrigin)
Throws a NotSupportedException.
void
SetLength(long value)
  • Overrides: Stream.SetLength(long)
void
Write(byte[] buffer, int offset, int count)
  • Overrides: Stream.Write(byte[], int, int)

Instance properties

bool
  • Overrides: Stream.CanRead
Always returns true.
bool
  • Overrides: Stream.CanSeek
Always returns false.
bool
  • Overrides: Stream.CanWrite
boolInitially true. Whenever the parent stream's position overtakes the position of this stream, changes to false. In this state, attempts to read will throw an InvalidOperationException and the stream becomes useless.
long
  • Overrides: Stream.Length
Throws a NotSupportedException.
long
  • Overrides: Stream.Position