C# Class MsgPack.UnpackingStream

Represents raw binary as read only Stream.

This object behaves as wrapper of the underlying Stream which contains message pack encoded byte array. But, this object does not own the stream, so that stream is not closed when this stream is closed.

The value of M:Stream.CanSeek, timeout, and async API depends on the underlying stream.

Inheritance: Stream
显示文件 Open project: msgpack/msgpack-cli Class Usage Examples

Public Methods

Method Description
Flush ( ) : void

Overrides M:Stream.Flush() so that no action is performed.

Read ( byte buffer, int offset, int count ) : int

Reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read.

Arguments might be passed to the underlying Stream without any validation.

SetLength ( long value ) : void

Throws NotSupportedException.

Write ( byte buffer, int offset, int count ) : void

Throws NotSupportedException.

Private Methods

Method Description
UnpackingStream ( Stream underlying, long rawLength ) : System

Method Details

Flush() public final method

Overrides M:Stream.Flush() so that no action is performed.
public final Flush ( ) : void
return void

Read() public final method

Reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read.
Arguments might be passed to the underlying Stream without any validation.
/// The sum of and is larger than the buffer length. /// /// is null. /// /// or is negative. /// /// An I/O error occurs. /// /// Methods were called after the stream was closed. ///
public final Read ( byte buffer, int offset, int count ) : int
buffer byte /// An array of bytes. When this method returns, /// the buffer contains the specified byte array with the values between and ( + - 1) /// replaced by the bytes read from the current source. ///
offset int /// The zero-based byte offset in at which to begin storing the data read from the current stream. ///
count int /// The maximum number of bytes to be read from the current stream. ///
return int

SetLength() public final method

Throws NotSupportedException.
/// Always thrown. ///
public final SetLength ( long value ) : void
value long Never used.
return void

Write() public final method

Throws NotSupportedException.
/// Always thrown. ///
public final Write ( byte buffer, int offset, int count ) : void
buffer byte Never used.
offset int Never used.
count int Never used.
return void