C# Class Gammtek.Conduit.IO.BitStream

Stream class for writing individual bits to a stream. Packs subsequent bytes written to the stream.
Inheritance: Stream
Show file Open project: ME3Explorer/ME3Explorer Class Usage Examples

Public Methods

Method Description
Flush ( ) : void

When overridden in a derived class, clears all buffers for this stream and causes any buffered data to be written to the underlying device.

ReadBoolean ( ) : bool

Reads the a boolean as a single bit from the stream.

Write ( bool value ) : void

Writes a bit to the stream.

Protected Methods

Method Description
BitStream ( ) : System

Initializes a new instance of the BitStream class.

BitStream ( Stream stream ) : System

Initializes a new instance of the BitStream class with backing stream. The stream will be automatically closed when this stream is closed.

BitStream ( Stream stream, bool leaveOpen ) : System

Initializes a new instance of the BitStream class with backing stream. The stream will be closed only if leaveOpen is false.

Dispose ( bool disposing ) : void

Disposes the base stream if set and leaveOpen is false.

InternalFlushBuffer ( bool flushAllBits ) : void

Flushes the internal buffer to disk.

Method Details

BitStream() protected method

Initializes a new instance of the BitStream class.
protected BitStream ( ) : System
return System

BitStream() protected method

Initializes a new instance of the BitStream class with backing stream. The stream will be automatically closed when this stream is closed.
protected BitStream ( Stream stream ) : System
stream Stream
return System

BitStream() protected method

Initializes a new instance of the BitStream class with backing stream. The stream will be closed only if leaveOpen is false.
protected BitStream ( Stream stream, bool leaveOpen ) : System
stream Stream
leaveOpen bool
return System

Dispose() protected method

Disposes the base stream if set and leaveOpen is false.
protected Dispose ( bool disposing ) : void
disposing bool
return void

Flush() public method

When overridden in a derived class, clears all buffers for this stream and causes any buffered data to be written to the underlying device.
public Flush ( ) : void
return void

InternalFlushBuffer() protected method

Flushes the internal buffer to disk.
protected InternalFlushBuffer ( bool flushAllBits ) : void
flushAllBits bool
return void

ReadBoolean() public abstract method

Reads the a boolean as a single bit from the stream.
public abstract ReadBoolean ( ) : bool
return bool

Write() public abstract method

Writes a bit to the stream.
public abstract Write ( bool value ) : void
value bool
return void