C# Class SwfDotNet.IO.Utils.BufferedBinaryWriter

BufferedBinaryWriter class. This class extends a binaryWriter to provide the way to read bit per bit a binary stream. This class use a buffer to do it. ATTENTION: By default, this writer works with LittleEndian mode (for x86).
Inheritance: System.IO.BinaryWriter
Mostra file Open project: bladecoding/SwfExport Class Usage Examples

Public Methods

Method Description
BufferedBinaryWriter ( Stream stream ) : System

Creates a new BufferedBinaryWriter instance.

BufferedBinaryWriter ( Stream stream, Encoding encodingMode ) : System

Creates a new BufferedBinaryWriter instance.

BufferedBinaryWriter ( Stream stream, Encoding encodingMode, bool useLittleEndian ) : System

Creates a new BufferedBinaryWriter instance.

BufferedBinaryWriter ( Stream stream, bool useLittleEndian ) : System

Creates a new BufferedBinaryWriter instance.

Flush ( ) : void

Flushes this instance.

GetNumBits ( float floatValue ) : uint

Gets the num bits.

GetNumBits ( int number ) : uint

Gets the num bits.

GetNumBits ( long number ) : uint

Gets the num bits.

GetNumBits ( long number, bool signed ) : uint

Gets the num bits.

GetNumBits ( short number ) : uint

Gets the num bits.

GetNumBits ( uint number ) : uint

Gets the num bits.

GetNumBits ( ushort number ) : uint

Gets the num bits.

Seek ( int offset, SeekOrigin origin ) : long

Seeks the specified offset.

SynchBits ( ) : void

Synchronizes the bits.

Write ( bool value ) : void

Writes the specified value.

Write ( byte value ) : void

Writes the specified value.

Write ( byte buffer, int index, int count ) : void

Writes the specified buffer.

Write ( char ch ) : void

Writes the specified ch.

Write ( char chars, int index, int count ) : void

Writes the specified chars.

Write ( decimal value ) : void

Writes the specified value.

Write ( double value ) : void

Writes the specified value.

Write ( float value ) : void

Writes the specified value.

Write ( int value ) : void

Writes the specified value.

Write ( long value ) : void

Writes the specified value.

Write ( sbyte value ) : void

Writes the specified value.

Write ( short value ) : void

Writes the specified value.

Write ( string value ) : void

Writes the specified value.

Write ( uint value ) : void

Writes the specified value.

Write ( ulong value ) : void

Writes the specified value.

Write ( ushort value ) : void

Writes the specified value.

WriteAt ( uint value, long position ) : void

Writes at.

WriteAt ( ushort value, long position ) : void

Writes at.

WriteBoolean ( bool value ) : void

Writes the boolean.

WriteFBits ( float value, uint numberOfBits ) : void

Writes the Fixed bits.

WriteFWord ( float value, uint mantissaSize, uint fractionSize ) : void

Writes the Fixed word.

WriteSBits ( int value, uint numberOfBits ) : void

Writes signed bits.

WriteSBits ( long value, uint numberOfBits ) : void

Writes signed bits.

WriteSBits ( short value, uint numberOfBits ) : void

Writes signed bits.

WriteString ( string value ) : void

Writes the string.

WriteString ( string value, uint size ) : void

Writes the string.

WriteUBits ( long value, uint numberOfBits ) : void

Writes unsigned bits.

WriteUBits ( uint value, uint numberOfBits ) : void

Writes unsigned bits.

WriteUBits ( ushort value, uint numberOfBits ) : void

Writes unsigned bits.

Private Methods

Method Description
WriteInternal ( byte bytes, int length ) : void

Writes the specified number of bytes from the start of the given byte array, after checking whether or not the writer has been disposed.

Method Details

BufferedBinaryWriter() public method

Creates a new BufferedBinaryWriter instance.
public BufferedBinaryWriter ( Stream stream ) : System
stream Stream Stream.
return System

BufferedBinaryWriter() public method

Creates a new BufferedBinaryWriter instance.
public BufferedBinaryWriter ( Stream stream, Encoding encodingMode ) : System
stream Stream Stream.
encodingMode System.Text.Encoding Encoding mode.
return System

BufferedBinaryWriter() public method

Creates a new BufferedBinaryWriter instance.
public BufferedBinaryWriter ( Stream stream, Encoding encodingMode, bool useLittleEndian ) : System
stream Stream Stream.
encodingMode System.Text.Encoding Encoding mode.
useLittleEndian bool Use little endian.
return System

BufferedBinaryWriter() public method

Creates a new BufferedBinaryWriter instance.
public BufferedBinaryWriter ( Stream stream, bool useLittleEndian ) : System
stream Stream Stream.
useLittleEndian bool Use little endian.
return System

Flush() public method

Flushes this instance.
public Flush ( ) : void
return void

GetNumBits() public static method

Gets the num bits.
public static GetNumBits ( float floatValue ) : uint
floatValue float Value.
return uint

GetNumBits() public static method

Gets the num bits.
public static GetNumBits ( int number ) : uint
number int Number.
return uint

GetNumBits() public static method

Gets the num bits.
public static GetNumBits ( long number ) : uint
number long Number.
return uint

GetNumBits() public static method

Gets the num bits.
public static GetNumBits ( long number, bool signed ) : uint
number long Number.
signed bool Signed.
return uint

GetNumBits() public static method

Gets the num bits.
public static GetNumBits ( short number ) : uint
number short Number.
return uint

GetNumBits() public static method

Gets the num bits.
public static GetNumBits ( uint number ) : uint
number uint Number.
return uint

GetNumBits() public static method

Gets the num bits.
public static GetNumBits ( ushort number ) : uint
number ushort Number.
return uint

Seek() public method

Seeks the specified offset.
public Seek ( int offset, SeekOrigin origin ) : long
offset int Offset.
origin SeekOrigin Origin.
return long

SynchBits() public method

Synchronizes the bits.
public SynchBits ( ) : void
return void

Write() public method

Writes the specified value.
public Write ( bool value ) : void
value bool Value.
return void

Write() public method

Writes the specified value.
public Write ( byte value ) : void
value byte Value.
return void

Write() public method

Writes the specified buffer.
public Write ( byte buffer, int index, int count ) : void
buffer byte Buffer.
index int Index.
count int Count.
return void

Write() public method

Writes the specified ch.
public Write ( char ch ) : void
ch char Ch.
return void

Write() public method

Writes the specified chars.
public Write ( char chars, int index, int count ) : void
chars char Chars.
index int Index.
count int Count.
return void

Write() public method

Writes the specified value.
public Write ( decimal value ) : void
value decimal Value.
return void

Write() public method

Writes the specified value.
public Write ( double value ) : void
value double Value.
return void

Write() public method

Writes the specified value.
public Write ( float value ) : void
value float Value.
return void

Write() public method

Writes the specified value.
public Write ( int value ) : void
value int Value.
return void

Write() public method

Writes the specified value.
public Write ( long value ) : void
value long Value.
return void

Write() public method

Writes the specified value.
public Write ( sbyte value ) : void
value sbyte Value.
return void

Write() public method

Writes the specified value.
public Write ( short value ) : void
value short Value.
return void

Write() public method

Writes the specified value.
public Write ( string value ) : void
value string Value.
return void

Write() public method

Writes the specified value.
public Write ( uint value ) : void
value uint Value.
return void

Write() public method

Writes the specified value.
public Write ( ulong value ) : void
value ulong Value.
return void

Write() public method

Writes the specified value.
public Write ( ushort value ) : void
value ushort Value.
return void

WriteAt() public method

Writes at.
public WriteAt ( uint value, long position ) : void
value uint Value.
position long Position.
return void

WriteAt() public method

Writes at.
public WriteAt ( ushort value, long position ) : void
value ushort Value.
position long Position.
return void

WriteBoolean() public method

Writes the boolean.
public WriteBoolean ( bool value ) : void
value bool Value.
return void

WriteFBits() public method

Writes the Fixed bits.
public WriteFBits ( float value, uint numberOfBits ) : void
value float Value.
numberOfBits uint Number of bits.
return void

WriteFWord() public method

Writes the Fixed word.
public WriteFWord ( float value, uint mantissaSize, uint fractionSize ) : void
value float Value.
mantissaSize uint Size of the mantissa.
fractionSize uint Size of the fraction.
return void

WriteSBits() public method

Writes signed bits.
public WriteSBits ( int value, uint numberOfBits ) : void
value int Value.
numberOfBits uint Number of bits.
return void

WriteSBits() public method

Writes signed bits.
public WriteSBits ( long value, uint numberOfBits ) : void
value long Value.
numberOfBits uint Number of bits.
return void

WriteSBits() public method

Writes signed bits.
public WriteSBits ( short value, uint numberOfBits ) : void
value short Value.
numberOfBits uint Number of bits.
return void

WriteString() public method

Writes the string.
public WriteString ( string value ) : void
value string Value.
return void

WriteString() public method

Writes the string.
public WriteString ( string value, uint size ) : void
value string Value.
size uint Size.
return void

WriteUBits() public method

Writes unsigned bits.
public WriteUBits ( long value, uint numberOfBits ) : void
value long Value.
numberOfBits uint Number of bits.
return void

WriteUBits() public method

Writes unsigned bits.
public WriteUBits ( uint value, uint numberOfBits ) : void
value uint Value.
numberOfBits uint Number of bits.
return void

WriteUBits() public method

Writes unsigned bits.
public WriteUBits ( ushort value, uint numberOfBits ) : void
value ushort Value.
numberOfBits uint Number of bits.
return void