C# Class SWFProcessing.SWFModeller.ABCDataTypeReader

A binary reader with methods for reading the atomic units of a ABC file.
Inheritance: IDisposable
ファイルを表示 Open project: WeeWorld/Swiffotron

Public Methods

Method Description
ABCDataTypeReader ( Stream inputStream ) : System

Initializes a new instance of a reader for a ABC data stream

Align8 ( ) : void

Align to the next whole byte. If we're already on a byte boundary, the next byte position does not change.

Dispose ( ) : void
ReadByteBlock ( int len ) : byte[]
ReadInt32 ( ) : int

There isn't any 32-bit types in ABC, they're all packed ints. You probably want ReadSI32 or ReadUI32 instead. This is here to allow us to fake reading doubles.

ReadSBits ( int numBits ) : int
ReadSI24 ( ) : int
ReadSI32 ( ) : int
ReadSI8 ( ) : int

Read an unsigned byte, aligned to the next byte boundary

ReadString ( ) : string

Reads a UTF8 string, prefixed by a length value stored as a packed int.

ReadU30 ( ) : uint

Reads an aligned 30-bit unsigned integer. The top two bits will be 0. See ReadEncodedU32 for a 32-bit version. This belongs in the ABC spec; 32-bit values belong in the SWF spec.

ReadUBits ( int numBits ) : uint
ReadUI16 ( ) : ushort

Read an unsigned short, aligned to the next byte boundary

ReadUI32 ( ) : uint

Read an unsigned int, aligned to the next byte boundary

ReadUI8 ( ) : int

Read an unsigned byte, aligned to the next byte boundary

Private Methods

Method Description
ReadFully ( byte b, int o, int len ) : void

Method Details

ABCDataTypeReader() public method

Initializes a new instance of a reader for a ABC data stream
public ABCDataTypeReader ( Stream inputStream ) : System
inputStream Stream The stream to read from
return System

Align8() public method

Align to the next whole byte. If we're already on a byte boundary, the next byte position does not change.
public Align8 ( ) : void
return void

Dispose() public method

public Dispose ( ) : void
return void

ReadByteBlock() public method

public ReadByteBlock ( int len ) : byte[]
len int
return byte[]

ReadInt32() public method

There isn't any 32-bit types in ABC, they're all packed ints. You probably want ReadSI32 or ReadUI32 instead. This is here to allow us to fake reading doubles.
public ReadInt32 ( ) : int
return int

ReadSBits() public method

public ReadSBits ( int numBits ) : int
numBits int
return int

ReadSI24() public method

public ReadSI24 ( ) : int
return int

ReadSI32() public method

public ReadSI32 ( ) : int
return int

ReadSI8() public method

Read an unsigned byte, aligned to the next byte boundary
public ReadSI8 ( ) : int
return int

ReadString() public method

Reads a UTF8 string, prefixed by a length value stored as a packed int.
public ReadString ( ) : string
return string

ReadU30() public method

Reads an aligned 30-bit unsigned integer. The top two bits will be 0. See ReadEncodedU32 for a 32-bit version. This belongs in the ABC spec; 32-bit values belong in the SWF spec.
public ReadU30 ( ) : uint
return uint

ReadUBits() public method

public ReadUBits ( int numBits ) : uint
numBits int
return uint

ReadUI16() public method

Read an unsigned short, aligned to the next byte boundary
public ReadUI16 ( ) : ushort
return ushort

ReadUI32() public method

Read an unsigned int, aligned to the next byte boundary
public ReadUI32 ( ) : uint
return uint

ReadUI8() public method

Read an unsigned byte, aligned to the next byte boundary
public ReadUI8 ( ) : int
return int