C# Class SwfDotNet.IO.Utils.BufferedBinaryReader

BufferedBinaryReader. This class extends a binaryReader to provide the way to read bit per bit a binary stream. This class use a buffer to do it. ATTENTION: By default, this class works with the LittleEndian mode (for x86).
Inheritance: System.IO.BinaryReader
Exibir arquivo Open project: bladecoding/SwfExport Class Usage Examples

Public Methods

Method Description
BufferedBinaryReader ( Stream stream ) : System

Creates a new BufferedBinaryReader instance.

BufferedBinaryReader ( Stream stream, bool useLittleEndian ) : System

Creates a new BufferedBinaryReader instance.

PeekByte ( ) : byte

Peeks the byte.

PeekBytes ( uint numToPeek ) : byte[]

Peeks the bytes.

PeekUInt16 ( ) : ushort

Peeks an Unsigned int16.

PeekUInt32 ( ) : uint

Peeks an Unsigned int32.

ReadBoolean ( ) : bool

Reads the bool.

ReadByte ( ) : byte

Reads the byte.

ReadChar ( ) : char

Reads the char.

ReadFloat ( ) : float

Reads the float.

ReadFloat ( uint numBits ) : float

Reads the float.

ReadFloat ( uint numBits, int fractionSize ) : float

Reads the float.

ReadFloatWord ( uint mantissaSize, uint fractionSize ) : float

Reads the float word.

ReadInt16 ( ) : short

Reads the int16.

ReadInt32 ( ) : int

Reads the int32.

ReadInt64 ( ) : long

Reads the int64.

ReadSBits ( uint bits ) : int

Reads Signed bits.

ReadString ( ) : string

Reads the string.

ReadString ( uint numChars ) : string

Reads the string.

ReadUBits ( uint bits ) : uint

Reads Unsigned bits.

ReadUInt16 ( ) : ushort

Reads an Unsigned int16.

ReadUInt32 ( ) : uint

Reads an Unsigned int32.

ReadUInt64 ( ) : ulong

Reads an Unsigned int64.

Seek ( uint position ) : void

Seeks the specified position.

Skip ( uint bytes ) : void

Skips the specified bytes.

SynchBits ( ) : void

Synchronizes the bits.

Private Methods

Method Description
ReadInternal ( byte data, int size ) : void

Reads the given number of bytes from the stream, throwing an exception if they can't all be read.

Method Details

BufferedBinaryReader() public method

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

BufferedBinaryReader() public method

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

PeekByte() public method

Peeks the byte.
public PeekByte ( ) : byte
return byte

PeekBytes() public method

Peeks the bytes.
public PeekBytes ( uint numToPeek ) : byte[]
numToPeek uint Num to peek.
return byte[]

PeekUInt16() public method

Peeks an Unsigned int16.
public PeekUInt16 ( ) : ushort
return ushort

PeekUInt32() public method

Peeks an Unsigned int32.
public PeekUInt32 ( ) : uint
return uint

ReadBoolean() public method

Reads the bool.
public ReadBoolean ( ) : bool
return bool

ReadByte() public method

Reads the byte.
public ReadByte ( ) : byte
return byte

ReadChar() public method

Reads the char.
public ReadChar ( ) : char
return char

ReadFloat() public method

Reads the float.
public ReadFloat ( ) : float
return float

ReadFloat() public method

Reads the float.
public ReadFloat ( uint numBits ) : float
numBits uint Bits number.
return float

ReadFloat() public method

Reads the float.
public ReadFloat ( uint numBits, int fractionSize ) : float
numBits uint Num bits.
fractionSize int Size of the fraction.
return float

ReadFloatWord() public method

Reads the float word.
public ReadFloatWord ( uint mantissaSize, uint fractionSize ) : float
mantissaSize uint Size of the mantissa.
fractionSize uint Size of the fraction.
return float

ReadInt16() public method

Reads the int16.
public ReadInt16 ( ) : short
return short

ReadInt32() public method

Reads the int32.
public ReadInt32 ( ) : int
return int

ReadInt64() public method

Reads the int64.
public ReadInt64 ( ) : long
return long

ReadSBits() public method

Reads Signed bits.
public ReadSBits ( uint bits ) : int
bits uint Bits.
return int

ReadString() public method

Reads the string.
public ReadString ( ) : string
return string

ReadString() public method

Reads the string.
public ReadString ( uint numChars ) : string
numChars uint Num chars to read.
return string

ReadUBits() public method

Reads Unsigned bits.
public ReadUBits ( uint bits ) : uint
bits uint Bits.
return uint

ReadUInt16() public method

Reads an Unsigned int16.
public ReadUInt16 ( ) : ushort
return ushort

ReadUInt32() public method

Reads an Unsigned int32.
public ReadUInt32 ( ) : uint
return uint

ReadUInt64() public method

Reads an Unsigned int64.
public ReadUInt64 ( ) : ulong
return ulong

Seek() public method

Seeks the specified position.
public Seek ( uint position ) : void
position uint Position.
return void

Skip() public method

Skips the specified bytes.
public Skip ( uint bytes ) : void
bytes uint Bytes.
return void

SynchBits() public method

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