Class Swift_CharacterStream_ArrayCharacterStream
Inheritance | Swift_CharacterStream_ArrayCharacterStream |
---|---|
Implements | Swift_CharacterStream |
A CharacterStream implementation which stores characters in an internal array.
Public Methods
Method | Description | Defined 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
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 |
Empty the stream and reset the internal pointer.
public void flushContents ( ) |
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 |
Import a string a bytes into this CharacterStream, overwriting any existing data in the stream.
public void importString ( $string ) | ||
$string | string |
Read $length characters from the stream and move the internal pointer $length further into the stream.
public string read ( $length ) | ||
$length | int |
Read $length characters from the stream and return a 1-dimensional array containing there octet values.
public integer[] readBytes ( $length ) | ||
$length | int |
Set the CharacterReaderFactory for multi charset support.
public void setCharacterReaderFactory ( Swift_CharacterReaderFactory $factory ) | ||
$factory | Swift_CharacterReaderFactory |
Set the character set used in this CharacterStream.
public void setCharacterSet ( $charset ) | ||
$charset | string |
Move the internal pointer to $charOffset in the stream.
public void setPointer ( $charOffset ) | ||
$charOffset | int |
Write $chars to the end of the stream.
public void write ( $chars ) | ||
$chars | string |