Class CopyStream
Copies the source stream to destination stream.
But this let users to peek and read the copying process.
Assembly: StreamExtended.dll
Syntax
public class CopyStream : ICustomStreamReader, IDisposable
Constructors
CopyStream(ICustomStreamReader, ICustomStreamWriter, IBufferPool, Int32)
Declaration
public CopyStream(ICustomStreamReader reader, ICustomStreamWriter writer, IBufferPool bufferPool, int bufferSize)
Parameters
Properties
Available
Declaration
public int Available { get; }
Property Value
BufferSize
Declaration
public int BufferSize { get; }
Property Value
DataAvailable
Declaration
public bool DataAvailable { get; }
Property Value
ReadBytes
Declaration
public long ReadBytes { get; }
Property Value
Methods
Dispose()
Declaration
FillBufferAsync(CancellationToken)
Declaration
public Task<bool> FillBufferAsync(CancellationToken cancellationToken = default(CancellationToken))
Parameters
Returns
Flush()
Declaration
FlushAsync(CancellationToken)
Declaration
public Task FlushAsync(CancellationToken cancellationToken = default(CancellationToken))
Parameters
Returns
PeekByteAsync(Int32, CancellationToken)
Declaration
public Task<int> PeekByteAsync(int index, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Returns
PeekByteFromBuffer(Int32)
Declaration
public byte PeekByteFromBuffer(int index)
Parameters
Type |
Name |
Description |
Int32 |
index |
|
Returns
PeekBytesAsync(Int32, Int32, CancellationToken)
Declaration
public Task<byte[]> PeekBytesAsync(int index, int size, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Returns
Read(Byte[], Int32, Int32)
Declaration
public int Read(byte[] buffer, int offset, int count)
Parameters
Returns
ReadAsync(Byte[], Int32, Int32, CancellationToken)
Declaration
public Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Returns
ReadByteFromBuffer()
Declaration
public byte ReadByteFromBuffer()
Returns
ReadLineAsync(CancellationToken)
Declaration
public Task<string> ReadLineAsync(CancellationToken cancellationToken = default(CancellationToken))
Parameters
Returns
Implements