Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
Utility class to walk through a data stream byte by byte with conventional names
bool $_bigEndian = ''
int $_needle = ''
string $_stream = ''
int $_streamLength = ''
__construct(
string $stream
)
:
void
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.
getStream(
)
:
string
Returns the current stream
readByte(
)
:
int
Reads a signed byte
readBytes(
int $length
)
:
string
Read the number of bytes in a row for the length supplied.
readDouble(
)
:
double
Reads an IEEE 754 double-precision floating point number from the data stream.
readInt(
)
:
int
Reads a signed 32-bit integer from the data stream.
readLong(
)
:
double
Read a long numeric value
readLongUtf(
)
:
string
Read a long UTF string
readUnsignedShort(
)
:
double
Read a 16 bit unsigned short.
readUtf(
)
:
string
Reads a UTF-8 string from the data stream
writeByte(
string $stream
)
:
Zend_Amf_Util_BinaryStream
Writes the passed string into a signed byte on the stream.
writeBytes(
string $bytes
)
:
Zend_Amf_Util_BinaryStream
Write any length of bytes to the stream
Usually a string.
writeDouble(
string|double $stream
)
:
Zend_Amf_Util_BinaryStream
Writes an IEEE 754 double-precision floating point number from the data stream.
writeInt(
int $stream
)
:
Zend_Amf_Util_BinaryStream
Write an the integer to the output stream as a 32 bit signed integer
writeLong(
int|string $stream
)
:
Zend_Amf_Util_BinaryStream
Write long numeric value to output stream
writeLongUtf(
string $stream
)
:
Zend_Amf_Util_BinaryStream
Write a long UTF string to the buffer
writeUtf(
string $stream
)
:
Zend_Amf_Util_BinaryStream
Wite a UTF-8 string to the outputstream