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
Afficher le fichier Open project: bladecoding/SwfExport Class Usage Examples

Méthodes publiques

Méthode 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

Méthode 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 méthode

Creates a new BufferedBinaryWriter instance.
public BufferedBinaryWriter ( Stream stream ) : System
stream Stream Stream.
Résultat System

BufferedBinaryWriter() public méthode

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

BufferedBinaryWriter() public méthode

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.
Résultat System

BufferedBinaryWriter() public méthode

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

Flush() public méthode

Flushes this instance.
public Flush ( ) : void
Résultat void

GetNumBits() public static méthode

Gets the num bits.
public static GetNumBits ( float floatValue ) : uint
floatValue float Value.
Résultat uint

GetNumBits() public static méthode

Gets the num bits.
public static GetNumBits ( int number ) : uint
number int Number.
Résultat uint

GetNumBits() public static méthode

Gets the num bits.
public static GetNumBits ( long number ) : uint
number long Number.
Résultat uint

GetNumBits() public static méthode

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

GetNumBits() public static méthode

Gets the num bits.
public static GetNumBits ( short number ) : uint
number short Number.
Résultat uint

GetNumBits() public static méthode

Gets the num bits.
public static GetNumBits ( uint number ) : uint
number uint Number.
Résultat uint

GetNumBits() public static méthode

Gets the num bits.
public static GetNumBits ( ushort number ) : uint
number ushort Number.
Résultat uint

Seek() public méthode

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

SynchBits() public méthode

Synchronizes the bits.
public SynchBits ( ) : void
Résultat void

Write() public méthode

Writes the specified value.
public Write ( bool value ) : void
value bool Value.
Résultat void

Write() public méthode

Writes the specified value.
public Write ( byte value ) : void
value byte Value.
Résultat void

Write() public méthode

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

Write() public méthode

Writes the specified ch.
public Write ( char ch ) : void
ch char Ch.
Résultat void

Write() public méthode

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

Write() public méthode

Writes the specified value.
public Write ( decimal value ) : void
value decimal Value.
Résultat void

Write() public méthode

Writes the specified value.
public Write ( double value ) : void
value double Value.
Résultat void

Write() public méthode

Writes the specified value.
public Write ( float value ) : void
value float Value.
Résultat void

Write() public méthode

Writes the specified value.
public Write ( int value ) : void
value int Value.
Résultat void

Write() public méthode

Writes the specified value.
public Write ( long value ) : void
value long Value.
Résultat void

Write() public méthode

Writes the specified value.
public Write ( sbyte value ) : void
value sbyte Value.
Résultat void

Write() public méthode

Writes the specified value.
public Write ( short value ) : void
value short Value.
Résultat void

Write() public méthode

Writes the specified value.
public Write ( string value ) : void
value string Value.
Résultat void

Write() public méthode

Writes the specified value.
public Write ( uint value ) : void
value uint Value.
Résultat void

Write() public méthode

Writes the specified value.
public Write ( ulong value ) : void
value ulong Value.
Résultat void

Write() public méthode

Writes the specified value.
public Write ( ushort value ) : void
value ushort Value.
Résultat void

WriteAt() public méthode

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

WriteAt() public méthode

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

WriteBoolean() public méthode

Writes the boolean.
public WriteBoolean ( bool value ) : void
value bool Value.
Résultat void

WriteFBits() public méthode

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

WriteFWord() public méthode

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.
Résultat void

WriteSBits() public méthode

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

WriteSBits() public méthode

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

WriteSBits() public méthode

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

WriteString() public méthode

Writes the string.
public WriteString ( string value ) : void
value string Value.
Résultat void

WriteString() public méthode

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

WriteUBits() public méthode

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

WriteUBits() public méthode

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

WriteUBits() public méthode

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