C# Class 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.
Inheritance: Stream
Afficher le fichier Open project: AArnott/IronPigeon

Méthodes publiques

Méthode Description
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

Méthodes protégées

Méthode Description
Dispose ( bool disposing ) : void

Method Details

Dispose() protected méthode

protected Dispose ( bool disposing ) : void
disposing bool
Résultat void

Flush() public méthode

public Flush ( ) : void
Résultat void

FlushAsync() public méthode

public FlushAsync ( CancellationToken cancellationToken ) : Task
cancellationToken System.Threading.CancellationToken
Résultat Task

Read() public méthode

public Read ( byte buffer, int offset, int count ) : int
buffer byte
offset int
count int
Résultat int

ReadAsync() public méthode

public ReadAsync ( byte buffer, int offset, int count, CancellationToken cancellationToken ) : Task
buffer byte
offset int
count int
cancellationToken System.Threading.CancellationToken
Résultat Task

ReadByte() public méthode

public ReadByte ( ) : int
Résultat int

Seek() public méthode

public Seek ( long offset, SeekOrigin origin ) : long
offset long
origin SeekOrigin
Résultat long

SetLength() public méthode

public SetLength ( long value ) : void
value long
Résultat void

Substream() public méthode

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.
Résultat System

Write() public méthode

public Write ( byte buffer, int offset, int count ) : void
buffer byte
offset int
count int
Résultat void

WriteAsync() public méthode

public WriteAsync ( byte buffer, int offset, int count, System cancellationToken ) : Task
buffer byte
offset int
count int
cancellationToken System
Résultat Task

WriteByte() public méthode

public WriteByte ( byte value ) : void
value byte
Résultat void