API Documentation

Amf/Parse/InputStream.php

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.

category
Zend  
copyright
Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)  
license
New BSD License  
package
Zend_Amf  
subpackage
Parse  
version
$Id: InputStream.php 23775 2011-03-01 17:25:24Z ralph $  

\Zend_Amf_Parse_InputStream

InputStream is used to iterate at a binary level through the AMF request.

InputStream extends BinaryStream as eventually BinaryStream could be placed outside of Zend_Amf in order to allow other packages to use the class.

Extends from
\Zend_Amf_Util_BinaryStream
copyright
Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)  
license
New BSD License  
package
Zend_Amf  
subpackage
Parse  

Methods

methodpublic__construct( string $stream ) : void

Constructor

Inherited from: \Zend_Amf_Util_BinaryStream::__construct()

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
Name Type Description
$stream string

use '' if creating a new stream or pass a string if reading.

methodpublicgetStream( ) : string

Returns the current stream

Inherited from: \Zend_Amf_Util_BinaryStream::getStream()
Returns
Type Description
string
methodpublicreadByte( ) : int

Reads a signed byte

Inherited from: \Zend_Amf_Util_BinaryStream::readByte()
Returns
Type Description
int Value is in the range of -128 to 127.
methodpublicreadBytes( int $length ) : string

Read the number of bytes in a row for the length supplied.

Inherited from: \Zend_Amf_Util_BinaryStream::readBytes()
Parameters
Name Type Description
$length int
Returns
Type Description
string
Throws
Exception Description
\Zend_Amf_Exception for buffer underrun
Details
todo
Should check that there are enough bytes left in the stream we are about to read.  
methodpublicreadDouble( ) : double

Reads an IEEE 754 double-precision floating point number from the data stream.

Inherited from: \Zend_Amf_Util_BinaryStream::readDouble()
Returns
Type Description
double Floating point number
methodpublicreadInt( ) : int

Reads a signed 32-bit integer from the data stream.

Inherited from: \Zend_Amf_Util_BinaryStream::readInt()
Returns
Type Description
int Value is in the range of -2147483648 to 2147483647
methodpublicreadLong( ) : double

Read a long numeric value

Inherited from: \Zend_Amf_Util_BinaryStream::readLong()
Returns
Type Description
double
methodpublicreadLongUtf( ) : string

Read a long UTF string

Inherited from: \Zend_Amf_Util_BinaryStream::readLongUtf()
Returns
Type Description
string
methodpublicreadUnsignedShort( ) : double

Read a 16 bit unsigned short.

Inherited from: \Zend_Amf_Util_BinaryStream::readUnsignedShort()
Returns
Type Description
double
Details
todo
This could use the unpack() w/ S,n, or v  
methodpublicreadUtf( ) : string

Reads a UTF-8 string from the data stream

Inherited from: \Zend_Amf_Util_BinaryStream::readUtf()
Returns
Type Description
string A UTF-8 string produced by the byte representation of characters
methodpublicwriteByte( string $stream ) : \Zend_Amf_Util_BinaryStream

Writes the passed string into a signed byte on the stream.

Inherited from: \Zend_Amf_Util_BinaryStream::writeByte()
Parameters
Name Type Description
$stream string
Returns
Type Description
\Zend_Amf_Util_BinaryStream
methodpublicwriteBytes( string $bytes ) : \Zend_Amf_Util_BinaryStream

Write any length of bytes to the stream

Inherited from: \Zend_Amf_Util_BinaryStream::writeBytes()

Usually a string.

Parameters
Name Type Description
$bytes string
Returns
Type Description
\Zend_Amf_Util_BinaryStream
methodpublicwriteDouble( string|double $stream ) : \Zend_Amf_Util_BinaryStream

Writes an IEEE 754 double-precision floating point number from the data stream.

Inherited from: \Zend_Amf_Util_BinaryStream::writeDouble()
Parameters
Name Type Description
$stream string|double
Returns
Type Description
\Zend_Amf_Util_BinaryStream
methodpublicwriteInt( int $stream ) : \Zend_Amf_Util_BinaryStream

Write an the integer to the output stream as a 32 bit signed integer

Inherited from: \Zend_Amf_Util_BinaryStream::writeInt()
Parameters
Name Type Description
$stream int
Returns
Type Description
\Zend_Amf_Util_BinaryStream
methodpublicwriteLong( int|string $stream ) : \Zend_Amf_Util_BinaryStream

Write long numeric value to output stream

Inherited from: \Zend_Amf_Util_BinaryStream::writeLong()
Parameters
Name Type Description
$stream int|string
Returns
Type Description
\Zend_Amf_Util_BinaryStream
methodpublicwriteLongUtf( string $stream ) : \Zend_Amf_Util_BinaryStream

Write a long UTF string to the buffer

Inherited from: \Zend_Amf_Util_BinaryStream::writeLongUtf()
Parameters
Name Type Description
$stream string
Returns
Type Description
\Zend_Amf_Util_BinaryStream
methodpublicwriteUtf( string $stream ) : \Zend_Amf_Util_BinaryStream

Wite a UTF-8 string to the outputstream

Inherited from: \Zend_Amf_Util_BinaryStream::writeUtf()
Parameters
Name Type Description
$stream string
Returns
Type Description
\Zend_Amf_Util_BinaryStream
Documentation was generated by DocBlox 0.13.3.