UK_CO_MEVANSPN_libBitStream.BitStreamReader Class Reference

Objects derived from the BitStreamReader class are used to retrieve binary data from a pre-existing source - currently either a byte array stored in memory or from a file stored on read-accessible storage media. More...

List of all members.

Public Member Functions

 BitStreamReader (byte[] _data)
 Constructor creates a BitStreamReader object that retrieves data from a byte array in memory.
 BitStreamReader (String _filename)
 Constructor creates a BitStreamReader bbject that retrieves data from a file. If the file cannot be read, the method will throw a System.IO.FileNotFound exception.
byte readByte (int _req_bits)
 Returns a byte value defined by the data contained in the number of bits given by the calling method.
char readChar ()
 Returns a char value. Will throw an EndOfDataException if there is insufficient data left in the BitStreamReader object's data store.
string readString ()
 Returns a string. The string is stored in a zero-terminated format. The method will throw an EndOfDataException if there is insufficient data left in the BitStreamReader object's data store.
ushort readUShort ()
 Returns an unsigned short value. The method will throw an EndOfDataException if there is insufficient data left in the BitStreamReader object's data store.
short readShort ()
 Returns a short value. The method will throw an EndOfDataException if there is insufficient data left in the BitStreamReader object's data store.
int readInt ()
 Returns an integer value. The method will throw an EndOfDataException if there is insufficient data left in the BitStreamReader object's data store.
uint readUInt ()
 Returns an unsigned integer value. The method will throw an EndOfDataException if there is insufficient data left the BitStreamReader object's data store.
long readLong ()
 Returns an long value. The method will throw an EndOfDataException if there is insufficient data left the BitStreamReader object's data store.
ulong readULong ()
 Returns an unsigned long value. The method will throw an EndOfDataException if there is insufficient data left the BitStreamReader object's data store.
float readFloat ()
 Returns a float value. The method will throw an EndOfDataException if there is insufficient data left the BitStreamReader object's data store.
double readDouble ()
 Returns a double value. The method will throw an EndOfDataException if there is insufficient data left the BitStreamReader object's data store.
void close ()
 Closes the BitStreamReader data storage and hence - access.


Detailed Description

Objects derived from the BitStreamReader class are used to retrieve binary data from a pre-existing source - currently either a byte array stored in memory or from a file stored on read-accessible storage media.


Constructor & Destructor Documentation

UK_CO_MEVANSPN_libBitStream.BitStreamReader.BitStreamReader ( byte[]  _data  ) 

Constructor creates a BitStreamReader object that retrieves data from a byte array in memory.

Parameters:
_data Reference to the data block to use. A System.Byte

UK_CO_MEVANSPN_libBitStream.BitStreamReader.BitStreamReader ( String  _filename  ) 

Constructor creates a BitStreamReader bbject that retrieves data from a file. If the file cannot be read, the method will throw a System.IO.FileNotFound exception.

Parameters:
_filename A string referencing the file holding the BitStreamReader data. A System.String


Member Function Documentation

byte UK_CO_MEVANSPN_libBitStream.BitStreamReader.readByte ( int  _req_bits  ) 

Returns a byte value defined by the data contained in the number of bits given by the calling method.

Parameters:
_req_bits The number of bits to read from the BitStreamReader. Must be in the range 1 to 8. A System.Int32
Returns:
The byte value read. A System.Byte

char UK_CO_MEVANSPN_libBitStream.BitStreamReader.readChar (  ) 

Returns a char value. Will throw an EndOfDataException if there is insufficient data left in the BitStreamReader object's data store.

Returns:
Char value returned from the BitStreamReader data. A System.Char

string UK_CO_MEVANSPN_libBitStream.BitStreamReader.readString (  ) 

Returns a string. The string is stored in a zero-terminated format. The method will throw an EndOfDataException if there is insufficient data left in the BitStreamReader object's data store.

Returns:
The string value read. A System.String

ushort UK_CO_MEVANSPN_libBitStream.BitStreamReader.readUShort (  ) 

Returns an unsigned short value. The method will throw an EndOfDataException if there is insufficient data left in the BitStreamReader object's data store.

Returns:
The unsigned short value read. A System.UInt16

short UK_CO_MEVANSPN_libBitStream.BitStreamReader.readShort (  ) 

Returns a short value. The method will throw an EndOfDataException if there is insufficient data left in the BitStreamReader object's data store.

Returns:
The short value read. A System.UInt16

int UK_CO_MEVANSPN_libBitStream.BitStreamReader.readInt (  ) 

Returns an integer value. The method will throw an EndOfDataException if there is insufficient data left in the BitStreamReader object's data store.

Returns:
The int value read. A System.Int32

uint UK_CO_MEVANSPN_libBitStream.BitStreamReader.readUInt (  ) 

Returns an unsigned integer value. The method will throw an EndOfDataException if there is insufficient data left the BitStreamReader object's data store.

Returns:
The unsigned integer value read. A System.UInt32

long UK_CO_MEVANSPN_libBitStream.BitStreamReader.readLong (  ) 

Returns an long value. The method will throw an EndOfDataException if there is insufficient data left the BitStreamReader object's data store.

Returns:
The long value read. A System.Int64

ulong UK_CO_MEVANSPN_libBitStream.BitStreamReader.readULong (  ) 

Returns an unsigned long value. The method will throw an EndOfDataException if there is insufficient data left the BitStreamReader object's data store.

Returns:
The unsigned long value read. A System.UInt64

float UK_CO_MEVANSPN_libBitStream.BitStreamReader.readFloat (  ) 

Returns a float value. The method will throw an EndOfDataException if there is insufficient data left the BitStreamReader object's data store.

Returns:
The float value read. A System.Single

double UK_CO_MEVANSPN_libBitStream.BitStreamReader.readDouble (  ) 

Returns a double value. The method will throw an EndOfDataException if there is insufficient data left the BitStreamReader object's data store.

Returns:
The double value read. A System.Double

void UK_CO_MEVANSPN_libBitStream.BitStreamReader.close (  ) 

Closes the BitStreamReader data storage and hence - access.


The documentation for this class was generated from the following file:

Generated on Fri Feb 20 12:38:23 2009 for libBitStreamDoc by  doxygen 1.5.6