Search Results for

    Show / Hide Table of Contents

    Interface ICustomStreamReader

    This concrete implemetation of interface acts as the source stream for CopyStream class.

    Namespace: StreamExtended.Network
    Assembly: StreamExtended.dll
    Syntax
    public interface ICustomStreamReader

    Properties

    | Edit this page View Source

    Available

    Declaration
    int Available { get; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    BufferSize

    Declaration
    int BufferSize { get; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    DataAvailable

    Declaration
    bool DataAvailable { get; }
    Property Value
    Type Description
    bool

    Methods

    | Edit this page View Source

    FillBufferAsync(CancellationToken)

    Fills the buffer asynchronous.

    Declaration
    Task<bool> FillBufferAsync(CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    CancellationToken cancellationToken
    Returns
    Type Description
    Task<bool>
    | Edit this page View Source

    PeekByteAsync(int, CancellationToken)

    Peeks a byte asynchronous.

    Declaration
    Task<int> PeekByteAsync(int index, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    int index

    The index.

    CancellationToken cancellationToken

    The cancellation token.

    Returns
    Type Description
    Task<int>
    | Edit this page View Source

    PeekByteFromBuffer(int)

    Peeks a byte from buffer.

    Declaration
    byte PeekByteFromBuffer(int index)
    Parameters
    Type Name Description
    int index

    The index.

    Returns
    Type Description
    byte
    Exceptions
    Type Condition
    Exception

    Index is out of buffer size

    | Edit this page View Source

    PeekBytesAsync(int, int, CancellationToken)

    Peeks bytes asynchronous.

    Declaration
    Task<byte[]?> PeekBytesAsync(int index, int size, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    int index

    The index.

    int size

    The number of bytes to peek.

    CancellationToken cancellationToken

    The cancellation token.

    Returns
    Type Description
    Task<byte[]>
    | Edit this page View Source

    Read(byte[], int, int)

    When overridden in a derived class, reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read.

    Declaration
    int Read(byte[] buffer, int offset, int count)
    Parameters
    Type Name Description
    byte[] buffer

    An array of bytes. When this method returns, the buffer contains the specified byte array with the values between offset and (offset + count - 1) replaced by the bytes read from the current source.

    int offset

    The zero-based byte offset in buffer at which to begin storing the data read from the current stream.

    int count

    The maximum number of bytes to be read from the current stream.

    Returns
    Type Description
    int

    The total number of bytes read into the buffer. This can be less than the number of bytes requested if that many bytes are not currently available, or zero (0) if the end of the stream has been reached.

    | Edit this page View Source

    ReadAsync(byte[], int, int, CancellationToken)

    Read the specified number (or less) of raw bytes from the base stream to the given buffer to the specified offset

    Declaration
    Task<int> ReadAsync(byte[] buffer, int offset, int bytesToRead, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    byte[] buffer
    int offset
    int bytesToRead
    CancellationToken cancellationToken
    Returns
    Type Description
    Task<int>

    The number of bytes read

    | Edit this page View Source

    ReadByteFromBuffer()

    Declaration
    byte ReadByteFromBuffer()
    Returns
    Type Description
    byte
    | Edit this page View Source

    ReadLineAsync(CancellationToken)

    Read a line from the byte stream

    Declaration
    Task<string?> ReadLineAsync(CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    CancellationToken cancellationToken
    Returns
    Type Description
    Task<string>
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX