C# Класс IronPigeon.Substream

Wraps an underlying stream with another that has a shorter length so that folks reading cannot read to the end.
The parent stream should not be repositioned while the substream is in use.
Наследование: Stream
Показать файл Открыть проект

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

Метод Описание
Flush ( ) : void
FlushAsync ( CancellationToken cancellationToken ) : Task
Read ( byte buffer, int offset, int count ) : int
ReadAsync ( byte buffer, int offset, int count, CancellationToken cancellationToken ) : Task
ReadByte ( ) : int
Seek ( long offset, SeekOrigin origin ) : long
SetLength ( long value ) : void
Substream ( Stream underlyingStream, long length ) : System

Initializes a new instance of the Substream class.

Write ( byte buffer, int offset, int count ) : void
WriteAsync ( byte buffer, int offset, int count, System cancellationToken ) : Task
WriteByte ( byte value ) : void

Защищенные методы

Метод Описание
Dispose ( bool disposing ) : void

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

Dispose() защищенный Метод

protected Dispose ( bool disposing ) : void
disposing bool
Результат void

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

public Flush ( ) : void
Результат void

FlushAsync() публичный Метод

public FlushAsync ( CancellationToken cancellationToken ) : Task
cancellationToken System.Threading.CancellationToken
Результат Task

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

public Read ( byte buffer, int offset, int count ) : int
buffer byte
offset int
count int
Результат int

ReadAsync() публичный Метод

public ReadAsync ( byte buffer, int offset, int count, CancellationToken cancellationToken ) : Task
buffer byte
offset int
count int
cancellationToken System.Threading.CancellationToken
Результат Task

ReadByte() публичный Метод

public ReadByte ( ) : int
Результат int

Seek() публичный Метод

public Seek ( long offset, SeekOrigin origin ) : long
offset long
origin SeekOrigin
Результат long

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

public SetLength ( long value ) : void
value long
Результат void

Substream() публичный Метод

Initializes a new instance of the Substream class.
public Substream ( Stream underlyingStream, long length ) : System
underlyingStream Stream The stream to wrap.
length long The length of the stream to expose in this wrapper.
Результат System

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

public Write ( byte buffer, int offset, int count ) : void
buffer byte
offset int
count int
Результат void

WriteAsync() публичный Метод

public WriteAsync ( byte buffer, int offset, int count, System cancellationToken ) : Task
buffer byte
offset int
count int
cancellationToken System
Результат Task

WriteByte() публичный Метод

public WriteByte ( byte value ) : void
value byte
Результат void