package |
Zend_Amf |
subpackage |
Util |
copyright |
Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
license |
New BSD License |
Methods
Constructor
__construct(string $stream) : void
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.
Parameters
$stream
string
use '' if creating a new stream or pass a string if reading.
Returns the current stream
getStream() : string
Reads a signed byte
readByte() : integer
Exceptions
Returns
integer
Value is in the range of -128 to 127.
Read the number of bytes in a row for the length supplied.
readBytes(integer $length) : string
todo |
Should check that there are enough bytes left in the stream we are about to read. |
Parameters
$length
integer
Exceptions
\Zend_Amf_Exception |
for buffer underrun |
Returns
string
Reads an IEEE 754 double-precision floating point number from the data stream.
readDouble() : double
Returns
double
Floating point number
Reads a signed 32-bit integer from the data stream.
readInt() : integer
Returns
integer
Value is in the range of -2147483648 to 2147483647
Read a long numeric value
readLong() : double
Read a long UTF string
readLongUtf() : string
Read a 16 bit unsigned short.
readUnsignedShort() : double
todo |
This could use the unpack() w/ S,n, or v |
Returns
double
Reads a UTF-8 string from the data stream
readUtf() : string
Returns
string
A UTF-8 string produced by the byte representation of characters
Writes the passed string into a signed byte on the stream.
writeByte(string $stream) : \Zend_Amf_Util_BinaryStream
Parameters
$stream
string
Returns
\Zend_Amf_Util_BinaryStream
Write any length of bytes to the stream
writeBytes(string $bytes) : \Zend_Amf_Util_BinaryStream
Parameters
$bytes
string
Returns
\Zend_Amf_Util_BinaryStream
Writes an IEEE 754 double-precision floating point number from the data stream.
writeDouble(string|double $stream) : \Zend_Amf_Util_BinaryStream
Parameters
$stream
string
double
Returns
\Zend_Amf_Util_BinaryStream
Write an the integer to the output stream as a 32 bit signed integer
writeInt(integer $stream) : \Zend_Amf_Util_BinaryStream
Parameters
$stream
integer
Returns
\Zend_Amf_Util_BinaryStream
Write long numeric value to output stream
writeLong(integer|string $stream) : \Zend_Amf_Util_BinaryStream
Parameters
$stream
integer
string
Returns
\Zend_Amf_Util_BinaryStream
Write a long UTF string to the buffer
writeLongUtf(string $stream) : \Zend_Amf_Util_BinaryStream
Parameters
$stream
string
Returns
\Zend_Amf_Util_BinaryStream
Wite a UTF-8 string to the outputstream
writeUtf(string $stream) : \Zend_Amf_Util_BinaryStream
Parameters
$stream
string
Returns
\Zend_Amf_Util_BinaryStream
Properties
BigEndian encoding?
$_bigEndian : boolean
str* functions overloaded using mbstring.func_overload?
$_mbStringFunctionsOverloaded : boolean
Current position in stream
$_needle : integer
Byte stream
$_stream : string
Length of stream
$_streamLength : integer