C# Class NodeNetAsync.Streams.NodeBufferedStream

Inheritance: IAsyncWriter
Show file Open project: soywiz/NodeNetAsync Class Usage Examples

Public Properties

Property Type Description
DefaultEncoding System.Text.Encoding

Protected Properties

Property Type Description
BufferSize int
RingBuffer IProducerConsumer
TempBuffer byte[]

Private Properties

Property Type Description
FillBuffer Task
Init void

Public Methods

Method Description
FlushAsync ( ) : Task
NodeBufferedStream ( Stream Stream, int BufferSize = DefaultBufferSize ) : System
ReadAsync ( byte Buffer, int Offset, int Count = -1 ) : Task
ReadBytesAsync ( int Count ) : Task
ReadBytesUntilByteAsync ( byte EndByte, int MaxBytesToRead = DefaultMaxBytesToRead ) : Task
ReadBytesUntilSequenceAsync ( byte Sequence ) : Task
ReadLineAsByteArrayAsync ( int MaxBytesToRead = DefaultMaxBytesToRead ) : Task
ReadLineAsMemoryStreamAsync ( int MaxBytesToRead = DefaultMaxBytesToRead ) : Task
ReadLineAsync ( Encoding Encoding = null, int MaxBytesToRead = DefaultMaxBytesToRead ) : Task
ReadStringAsync ( int Count, Encoding Encoding = null ) : Task
SkipBytesAsync ( int Count ) : Task
UnsafeSetStream ( Stream Stream ) : void
WriteAsync ( byte Buffer, int Offset, int Count = -1 ) : Task
WriteAsync ( string Text, Encoding Encoding = null ) : Task

Protected Methods

Method Description
NodeBufferedStream ( int BufferSize = DefaultBufferSize ) : System

Private Methods

Method Description
FillBuffer ( int MinimumSize ) : Task
Init ( ) : void

Method Details

FlushAsync() public method

public FlushAsync ( ) : Task
return Task

NodeBufferedStream() public method

public NodeBufferedStream ( Stream Stream, int BufferSize = DefaultBufferSize ) : System
Stream Stream
BufferSize int
return System

NodeBufferedStream() protected method

protected NodeBufferedStream ( int BufferSize = DefaultBufferSize ) : System
BufferSize int
return System

ReadAsync() public method

public ReadAsync ( byte Buffer, int Offset, int Count = -1 ) : Task
Buffer byte
Offset int
Count int
return Task

ReadBytesAsync() public method

public ReadBytesAsync ( int Count ) : Task
Count int
return Task

ReadBytesUntilByteAsync() public method

public ReadBytesUntilByteAsync ( byte EndByte, int MaxBytesToRead = DefaultMaxBytesToRead ) : Task
EndByte byte
MaxBytesToRead int
return Task

ReadBytesUntilSequenceAsync() public method

public ReadBytesUntilSequenceAsync ( byte Sequence ) : Task
Sequence byte
return Task

ReadLineAsByteArrayAsync() public method

public ReadLineAsByteArrayAsync ( int MaxBytesToRead = DefaultMaxBytesToRead ) : Task
MaxBytesToRead int
return Task

ReadLineAsMemoryStreamAsync() public method

public ReadLineAsMemoryStreamAsync ( int MaxBytesToRead = DefaultMaxBytesToRead ) : Task
MaxBytesToRead int
return Task

ReadLineAsync() public method

public ReadLineAsync ( Encoding Encoding = null, int MaxBytesToRead = DefaultMaxBytesToRead ) : Task
Encoding System.Text.Encoding
MaxBytesToRead int
return Task

ReadStringAsync() public method

public ReadStringAsync ( int Count, Encoding Encoding = null ) : Task
Count int
Encoding System.Text.Encoding
return Task

SkipBytesAsync() public method

public SkipBytesAsync ( int Count ) : Task
Count int
return Task

UnsafeSetStream() public method

public UnsafeSetStream ( Stream Stream ) : void
Stream Stream
return void

WriteAsync() public method

public WriteAsync ( byte Buffer, int Offset, int Count = -1 ) : Task
Buffer byte
Offset int
Count int
return Task

WriteAsync() public method

public WriteAsync ( string Text, Encoding Encoding = null ) : Task
Text string
Encoding System.Text.Encoding
return Task

Property Details

BufferSize protected property

protected int BufferSize
return int

DefaultEncoding public property

public Encoding,System.Text DefaultEncoding
return System.Text.Encoding

RingBuffer protected property

protected IProducerConsumer RingBuffer
return IProducerConsumer

TempBuffer protected property

protected byte[] TempBuffer
return byte[]