C# Class natix.CompactDS.OctetStream

Creates a stream of bytes. Reads and writes bytes from and to the current position in a given Context object
Inheritance: ILoadSave
Datei anzeigen Open project: sadit/natix Class Usage Examples

Public Methods

Method Description
Add ( IEnumerable array ) : int

Add a sequence of values to the end of the stream. Returns the first insertion position. Empty arrays will return the insertion position anyway of a non empty array.

Add ( byte b ) : int

Add a value to the end of the stream. Returns the insertion position

Load ( BinaryReader Input ) : void
OctetStream ( ) : System
OctetStream ( List input_stream ) : System
OctetStream ( OctetStream oct_stream ) : System
Read ( Context ctx ) : byte

Read the current value at Position, then increments ctx.Offset

Save ( BinaryWriter Output ) : void
Write ( byte b, Context ctx ) : void

Writes a byte to the position indicated in ctx.Offset, then increments ctx.Offset

Write ( byte b, int times, Context ctx ) : void

Writes times times the given byte.

Method Details

Add() public method

Add a sequence of values to the end of the stream. Returns the first insertion position. Empty arrays will return the insertion position anyway of a non empty array.
public Add ( IEnumerable array ) : int
array IEnumerable
return int

Add() public method

Add a value to the end of the stream. Returns the insertion position
public Add ( byte b ) : int
b byte
return int

Load() public method

public Load ( BinaryReader Input ) : void
Input System.IO.BinaryReader
return void

OctetStream() public method

public OctetStream ( ) : System
return System

OctetStream() public method

public OctetStream ( List input_stream ) : System
input_stream List
return System

OctetStream() public method

public OctetStream ( OctetStream oct_stream ) : System
oct_stream OctetStream
return System

Read() public method

Read the current value at Position, then increments ctx.Offset
public Read ( Context ctx ) : byte
ctx Context
return byte

Save() public method

public Save ( BinaryWriter Output ) : void
Output System.IO.BinaryWriter
return void

Write() public method

Writes a byte to the position indicated in ctx.Offset, then increments ctx.Offset
public Write ( byte b, Context ctx ) : void
b byte
ctx Context
return void

Write() public method

Writes times times the given byte.
public Write ( byte b, int times, Context ctx ) : void
b byte
times int
ctx Context
return void