Search Results for

    Show / Hide Table of Contents

    Class NetReadStream

    Read only stream (supports seek), optimized read for network reads

    Inheritance
    System.Object
    System.MarshalByRefObject
    System.IO.Stream
    NetReadStream
    NetReadForwardStream
    Implements
    System.IDisposable
    Inherited Members
    System.IO.Stream.Null
    System.IO.Stream.CopyToAsync(System.IO.Stream)
    System.IO.Stream.CopyToAsync(System.IO.Stream, System.Int32)
    System.IO.Stream.CopyTo(System.IO.Stream)
    System.IO.Stream.CopyTo(System.IO.Stream, System.Int32)
    System.IO.Stream.Dispose()
    System.IO.Stream.FlushAsync()
    System.IO.Stream.CreateWaitHandle()
    System.IO.Stream.ReadAsync(System.Byte[], System.Int32, System.Int32)
    System.IO.Stream.WriteAsync(System.Byte[], System.Int32, System.Int32)
    System.IO.Stream.Synchronized(System.IO.Stream)
    System.IO.Stream.ObjectInvariant()
    System.MarshalByRefObject.MemberwiseClone(System.Boolean)
    System.MarshalByRefObject.GetLifetimeService()
    System.MarshalByRefObject.InitializeLifetimeService()
    System.MarshalByRefObject.CreateObjRef(System.Type)
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: ImageVault.Common.Lib.IO
    Assembly: ImageVault.Common.dll
    Syntax
    public class NetReadStream : Stream, IDisposable

    Constructors

    NetReadStream(Stream)

    Default constructor

    Declaration
    public NetReadStream(Stream stream)
    Parameters
    Type Name Description
    System.IO.Stream stream
    Exceptions
    Type Condition
    System.ArgumentNullException

    Properties

    CanRead

    Declaration
    public override bool CanRead { get; }
    Property Value
    Type Description
    System.Boolean
    Overrides
    System.IO.Stream.CanRead

    CanSeek

    Declaration
    public override bool CanSeek { get; }
    Property Value
    Type Description
    System.Boolean
    Overrides
    System.IO.Stream.CanSeek

    CanTimeout

    Declaration
    public override bool CanTimeout { get; }
    Property Value
    Type Description
    System.Boolean
    Overrides
    System.IO.Stream.CanTimeout

    CanWrite

    Not supported

    Declaration
    public override bool CanWrite { get; }
    Property Value
    Type Description
    System.Boolean
    Overrides
    System.IO.Stream.CanWrite

    Length

    Declaration
    public override long Length { get; }
    Property Value
    Type Description
    System.Int64
    Overrides
    System.IO.Stream.Length

    Position

    Declaration
    public override long Position { get; set; }
    Property Value
    Type Description
    System.Int64
    Overrides
    System.IO.Stream.Position

    ReadTimeout

    Declaration
    public override int ReadTimeout { get; set; }
    Property Value
    Type Description
    System.Int32
    Overrides
    System.IO.Stream.ReadTimeout

    WriteTimeout

    Declaration
    public override int WriteTimeout { get; set; }
    Property Value
    Type Description
    System.Int32
    Overrides
    System.IO.Stream.WriteTimeout

    Methods

    BeginRead(Byte[], Int32, Int32, AsyncCallback, Object)

    Declaration
    public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
    Parameters
    Type Name Description
    System.Byte[] buffer
    System.Int32 offset
    System.Int32 count
    System.AsyncCallback callback
    System.Object state
    Returns
    Type Description
    System.IAsyncResult
    Overrides
    System.IO.Stream.BeginRead(System.Byte[], System.Int32, System.Int32, System.AsyncCallback, System.Object)

    BeginWrite(Byte[], Int32, Int32, AsyncCallback, Object)

    Not supported

    Declaration
    public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
    Parameters
    Type Name Description
    System.Byte[] buffer
    System.Int32 offset
    System.Int32 count
    System.AsyncCallback callback
    System.Object state
    Returns
    Type Description
    System.IAsyncResult
    Overrides
    System.IO.Stream.BeginWrite(System.Byte[], System.Int32, System.Int32, System.AsyncCallback, System.Object)

    Close()

    Declaration
    public override void Close()
    Overrides
    System.IO.Stream.Close()

    CopyToAsync(Stream, Int32, CancellationToken)

    Declaration
    public override Task CopyToAsync(Stream destination, int bufferSize, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    System.IO.Stream destination
    System.Int32 bufferSize
    System.Threading.CancellationToken cancellationToken
    Returns
    Type Description
    System.Threading.Tasks.Task
    Overrides
    System.IO.Stream.CopyToAsync(System.IO.Stream, System.Int32, System.Threading.CancellationToken)

    Dispose(Boolean)

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing
    Overrides
    System.IO.Stream.Dispose(System.Boolean)

    EndRead(IAsyncResult)

    Declaration
    public override int EndRead(IAsyncResult asyncResult)
    Parameters
    Type Name Description
    System.IAsyncResult asyncResult
    Returns
    Type Description
    System.Int32
    Overrides
    System.IO.Stream.EndRead(System.IAsyncResult)

    EndWrite(IAsyncResult)

    Not supported

    Declaration
    public override void EndWrite(IAsyncResult asyncResult)
    Parameters
    Type Name Description
    System.IAsyncResult asyncResult
    Overrides
    System.IO.Stream.EndWrite(System.IAsyncResult)

    Flush()

    Not supported

    Declaration
    public override void Flush()
    Overrides
    System.IO.Stream.Flush()

    FlushAsync(CancellationToken)

    Not supported

    Declaration
    public override Task FlushAsync(CancellationToken cancellationToken)
    Parameters
    Type Name Description
    System.Threading.CancellationToken cancellationToken
    Returns
    Type Description
    System.Threading.Tasks.Task
    Overrides
    System.IO.Stream.FlushAsync(System.Threading.CancellationToken)

    Read(Byte[], Int32, Int32)

    Declaration
    public override int Read(byte[] buffer, int offset, int count)
    Parameters
    Type Name Description
    System.Byte[] buffer
    System.Int32 offset
    System.Int32 count
    Returns
    Type Description
    System.Int32
    Overrides
    System.IO.Stream.Read(System.Byte[], System.Int32, System.Int32)

    ReadAsync(Byte[], Int32, Int32, CancellationToken)

    Declaration
    public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    System.Byte[] buffer
    System.Int32 offset
    System.Int32 count
    System.Threading.CancellationToken cancellationToken
    Returns
    Type Description
    System.Threading.Tasks.Task<System.Int32>
    Overrides
    System.IO.Stream.ReadAsync(System.Byte[], System.Int32, System.Int32, System.Threading.CancellationToken)

    ReadByte()

    Declaration
    public override int ReadByte()
    Returns
    Type Description
    System.Int32
    Overrides
    System.IO.Stream.ReadByte()

    Seek(Int64, SeekOrigin)

    Declaration
    public override long Seek(long offset, SeekOrigin origin)
    Parameters
    Type Name Description
    System.Int64 offset
    System.IO.SeekOrigin origin
    Returns
    Type Description
    System.Int64
    Overrides
    System.IO.Stream.Seek(System.Int64, System.IO.SeekOrigin)

    SetLength(Int64)

    Not supported

    Declaration
    public override void SetLength(long value)
    Parameters
    Type Name Description
    System.Int64 value
    Overrides
    System.IO.Stream.SetLength(System.Int64)

    Write(Byte[], Int32, Int32)

    Not supported

    Declaration
    public override void Write(byte[] buffer, int offset, int count)
    Parameters
    Type Name Description
    System.Byte[] buffer
    System.Int32 offset
    System.Int32 count
    Overrides
    System.IO.Stream.Write(System.Byte[], System.Int32, System.Int32)

    WriteAsync(Byte[], Int32, Int32, CancellationToken)

    Not supported

    Declaration
    public override Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    System.Byte[] buffer
    System.Int32 offset
    System.Int32 count
    System.Threading.CancellationToken cancellationToken
    Returns
    Type Description
    System.Threading.Tasks.Task
    Overrides
    System.IO.Stream.WriteAsync(System.Byte[], System.Int32, System.Int32, System.Threading.CancellationToken)

    WriteByte(Byte)

    Not supported

    Declaration
    public override void WriteByte(byte value)
    Parameters
    Type Name Description
    System.Byte value
    Overrides
    System.IO.Stream.WriteByte(System.Byte)

    Implements

    System.IDisposable

    Extension Methods

    EnumExtensions.GetNames<TEnum>(TEnum)
    StreamExtensions.WriteIntAsHex(Stream, Int32)
    StreamExtensions.WriteNewLine(Stream)
    StreamExtensions.ReadExact(Stream, Byte[], Int32, Int32)
    StreamExtensions.ReadAll(Stream)
    In This Article
    Back to top (c) Meriworks 2002-2022