PHP Class Swift_CharacterStream_ArrayCharacterStream, Halite

Author: Chris Corbyn
Inheritance: implements Swift_CharacterStream
Datei anzeigen Open project: HaliteChallenge/Halite Class Usage Examples

Public Methods

Method Description
__construct ( Swift_CharacterReaderFactory $factory, string $charset ) Create a new CharacterStream with the given $chars, if set.
flushContents ( ) Empty the stream and reset the internal pointer.
importByteStream ( Swift_OutputByteStream $os ) Overwrite this character stream using the byte sequence in the byte stream.
importString ( string $string ) Import a string a bytes into this CharacterStream, overwriting any existing data in the stream.
read ( integer $length ) : string Read $length characters from the stream and move the internal pointer $length further into the stream.
readBytes ( integer $length ) : integer[] Read $length characters from the stream and return a 1-dimensional array containing there octet values.
setCharacterReaderFactory ( Swift_CharacterReaderFactory $factory ) Set the CharacterReaderFactory for multi charset support.
setCharacterSet ( string $charset ) Set the character set used in this CharacterStream.
setPointer ( integer $charOffset ) Move the internal pointer to $charOffset in the stream.
write ( string $chars ) Write $chars to the end of the stream.

Private Methods

Method Description
_initializeMaps ( )
_reloadBuffer ( $fp, $len )

Method Details

__construct() public method

Create a new CharacterStream with the given $chars, if set.
public __construct ( Swift_CharacterReaderFactory $factory, string $charset )
$factory Swift_CharacterReaderFactory for loading validators
$charset string used in the stream

flushContents() public method

Empty the stream and reset the internal pointer.
public flushContents ( )

importByteStream() public method

Overwrite this character stream using the byte sequence in the byte stream.
public importByteStream ( Swift_OutputByteStream $os )
$os Swift_OutputByteStream output stream to read from

importString() public method

Import a string a bytes into this CharacterStream, overwriting any existing data in the stream.
public importString ( string $string )
$string string

read() public method

Read $length characters from the stream and move the internal pointer $length further into the stream.
public read ( integer $length ) : string
$length integer
return string

readBytes() public method

Read $length characters from the stream and return a 1-dimensional array containing there octet values.
public readBytes ( integer $length ) : integer[]
$length integer
return integer[]

setCharacterReaderFactory() public method

Set the CharacterReaderFactory for multi charset support.
public setCharacterReaderFactory ( Swift_CharacterReaderFactory $factory )
$factory Swift_CharacterReaderFactory

setCharacterSet() public method

Set the character set used in this CharacterStream.
public setCharacterSet ( string $charset )
$charset string

setPointer() public method

Move the internal pointer to $charOffset in the stream.
public setPointer ( integer $charOffset )
$charOffset integer

write() public method

Write $chars to the end of the stream.
public write ( string $chars )
$chars string