|
Moodle
2.2.1
http://www.collinsharper.com
|

Public Member Functions | |
| __construct ($stream) | |
| getStream () | |
| readBytes ($length) | |
| writeBytes ($bytes) | |
| readByte () | |
| writeByte ($stream) | |
| readInt () | |
| writeInt ($stream) | |
| readUtf () | |
| writeUtf ($stream) | |
| readLongUtf () | |
| writeLongUtf ($stream) | |
| readLong () | |
| writeLong ($stream) | |
| readUnsignedShort () | |
| readDouble () | |
| writeDouble ($stream) | |
Protected Attributes | |
| $_stream | |
| $_streamLength | |
| $_bigEndian | |
| $_needle | |
Definition at line 31 of file BinaryStream.php.
| __construct | ( | $ | stream | ) |
Constructor
Create a reference to a byte stream that is going to be parsed or created by the methods in the class. Detect if the class should use big or little Endian encoding.
| string | $stream | use '' if creating a new stream or pass a string if reading. |
Definition at line 63 of file BinaryStream.php.
| getStream | ( | ) |
| readByte | ( | ) |
Reads a signed byte
Definition at line 124 of file BinaryStream.php.

| readBytes | ( | $ | length | ) |
Read the number of bytes in a row for the length supplied.
| int | $length |
| Zend_Amf_Exception | for buffer underrun |
Definition at line 94 of file BinaryStream.php.

| readDouble | ( | ) |
Reads an IEEE 754 double-precision floating point number from the data stream.
Definition at line 256 of file BinaryStream.php.
| readInt | ( | ) |
Reads a signed 32-bit integer from the data stream.
Definition at line 151 of file BinaryStream.php.


| readLong | ( | ) |
Read a long numeric value
Definition at line 221 of file BinaryStream.php.


| readLongUtf | ( | ) |
Read a long UTF string
Definition at line 198 of file BinaryStream.php.

Read a 16 bit unsigned short.
Definition at line 244 of file BinaryStream.php.


| readUtf | ( | ) |
Reads a UTF-8 string from the data stream
Definition at line 173 of file BinaryStream.php.

| writeByte | ( | $ | stream | ) |
Writes the passed string into a signed byte on the stream.
| string | $stream |
Definition at line 140 of file BinaryStream.php.

| writeBytes | ( | $ | bytes | ) |
Write any length of bytes to the stream
Usually a string.
| string | $bytes |
Definition at line 113 of file BinaryStream.php.
| writeDouble | ( | $ | stream | ) |
Writes an IEEE 754 double-precision floating point number from the data stream.
| string | double | $stream |
Definition at line 275 of file BinaryStream.php.
| writeInt | ( | $ | stream | ) |
Write an the integer to the output stream as a 32 bit signed integer
| int | $stream |
Definition at line 162 of file BinaryStream.php.

| writeLong | ( | $ | stream | ) |
Write long numeric value to output stream
| int | string | $stream |
Definition at line 232 of file BinaryStream.php.

| writeLongUtf | ( | $ | stream | ) |
Write a long UTF string to the buffer
| string | $stream |
Definition at line 210 of file BinaryStream.php.

| writeUtf | ( | $ | stream | ) |
Wite a UTF-8 string to the outputstream
| string | $stream |
Definition at line 185 of file BinaryStream.php.

$_bigEndian [protected] |
Definition at line 46 of file BinaryStream.php.
$_needle [protected] |
Definition at line 51 of file BinaryStream.php.
$_stream [protected] |
Definition at line 36 of file BinaryStream.php.
$_streamLength [protected] |
Definition at line 41 of file BinaryStream.php.