Class Swift_CharacterStream_ArrayCharacterStream

InheritanceSwift_CharacterStream_ArrayCharacterStream
ImplementsSwift_CharacterStream

A CharacterStream implementation which stores characters in an internal array.

Public Methods

Hide inherited methods

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

Method Details

__construct() public method

Create a new CharacterStream with the given $chars, if set.

public void __construct ( Swift_CharacterReaderFactory $factory, $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 void flushContents ( )
importByteStream() public method

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

public void 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 void importString ( $string )
$string string
read() public method

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

public string read ( $length )
$length int
readBytes() public method

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

public integer[] readBytes ( $length )
$length int
setCharacterReaderFactory() public method

Set the CharacterReaderFactory for multi charset support.

public void setCharacterReaderFactory ( Swift_CharacterReaderFactory $factory )
$factory Swift_CharacterReaderFactory
setCharacterSet() public method

Set the character set used in this CharacterStream.

public void setCharacterSet ( $charset )
$charset string
setPointer() public method

Move the internal pointer to $charOffset in the stream.

public void setPointer ( $charOffset )
$charOffset int
write() public method

Write $chars to the end of the stream.

public void write ( $chars )
$chars string