TYPO3  7.6
Public Member Functions | List of all members
Swift_CharacterStream Interface Reference
Inheritance diagram for Swift_CharacterStream:
Swift_CharacterStream_ArrayCharacterStream Swift_CharacterStream_NgCharacterStream

Public Member Functions

 setCharacterSet ($charset)
 
 setCharacterReaderFactory (Swift_CharacterReaderFactory $factory)
 
 importByteStream (Swift_OutputByteStream $os)
 
 importString ($string)
 
 read ($length)
 
 readBytes ($length)
 
 write ($chars)
 
 setPointer ($charOffset)
 
 flushContents ()
 

Detailed Description

An abstract means of reading and writing data in terms of characters as opposed to bytes.

Classes implementing this interface may use a subsystem which requires less memory than working with large strings of data.

Author
Chris Corbyn

Definition at line 20 of file CharacterStream.php.

Member Function Documentation

flushContents ( )

Empty the stream and reset the internal pointer.

Implemented in Swift_CharacterStream_ArrayCharacterStream, and Swift_CharacterStream_NgCharacterStream.

importByteStream ( Swift_OutputByteStream  $os)

Overwrite this character stream using the byte sequence in the byte stream.

Parameters
Swift_OutputByteStream$osoutput stream to read from

Implemented in Swift_CharacterStream_NgCharacterStream, and Swift_CharacterStream_ArrayCharacterStream.

importString (   $string)

Import a string a bytes into this CharacterStream, overwriting any existing data in the stream.

Parameters
string$string

Implemented in Swift_CharacterStream_NgCharacterStream, and Swift_CharacterStream_ArrayCharacterStream.

read (   $length)

Read $length characters from the stream and move the internal pointer $length further into the stream.

Parameters
int$length
Returns
string

Implemented in Swift_CharacterStream_NgCharacterStream, and Swift_CharacterStream_ArrayCharacterStream.

readBytes (   $length)

Read $length characters from the stream and return a 1-dimensional array containing there octet values.

Parameters
int$length
Returns
int[]

Implemented in Swift_CharacterStream_NgCharacterStream, and Swift_CharacterStream_ArrayCharacterStream.

setCharacterReaderFactory ( Swift_CharacterReaderFactory  $factory)

Set the CharacterReaderFactory for multi charset support.

Parameters
Swift_CharacterReaderFactory$factory

Implemented in Swift_CharacterStream_NgCharacterStream, and Swift_CharacterStream_ArrayCharacterStream.

setCharacterSet (   $charset)

Set the character set used in this CharacterStream.

Parameters
string$charset

Implemented in Swift_CharacterStream_NgCharacterStream, and Swift_CharacterStream_ArrayCharacterStream.

setPointer (   $charOffset)

Move the internal pointer to $charOffset in the stream.

Parameters
int$charOffset

Implemented in Swift_CharacterStream_ArrayCharacterStream, and Swift_CharacterStream_NgCharacterStream.

write (   $chars)

Write $chars to the end of the stream.

Parameters
string$chars

Implemented in Swift_CharacterStream_NgCharacterStream, and Swift_CharacterStream_ArrayCharacterStream.