C# Класс 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.

Наследование: Stream
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
UnpackingStream ( Stream underlying, long rawLength ) : System

Описание методов

Flush() публичный закрытый Метод

Overrides M:Stream.Flush() so that no action is performed.
public final Flush ( ) : void
Результат void

Read() публичный закрытый Метод

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. ///
Результат int

SetLength() публичный закрытый Метод

Throws NotSupportedException.
/// Always thrown. ///
public final SetLength ( long value ) : void
value long Never used.
Результат void

Write() публичный закрытый Метод

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.
Результат void