PHP Interface Swift_CharacterStream, Halite

Classes implementing this interface may use a subsystem which requires less memory than working with large strings of data.
Author: Chris Corbyn
Mostrar archivo Open project: HaliteChallenge/Halite Interface Usage Examples

Public Methods

Method Description
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 ) : int[] 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.

Method Details

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 ) : int[]
$length integer
return int[]

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