\Swift_CharacterStream_NgCharacterStream
A CharacterStream implementation which stores characters in an internal array.
- Author: Xavier De Cock <xdecock@gmail.com>
Synopsis
class Swift_CharacterStream_NgCharacterStream
implements
Swift_CharacterStream
{
- // members
- private Swift_CharacterReader $_charReader;
- private Swift_CharacterReaderFactory $_charReaderFactory;
- private string $_charset;
- private string $_datas;
- private integer $_datasSize;
- private mixed $_map;
- private integer $_mapType;
- private integer $_charCount;
- private integer $_currentPos;
- // methods
- public void __construct()
- public void setCharacterSet()
- public void setCharacterReaderFactory()
- public void flushContents()
- public void importByteStream()
- public void importString()
- public string read()
- public array readBytes()
- public void setPointer()
- public void write()
Hierarchy
Implements
Members
private
- $_charCount
—
integer
Number of characters in the stream. - $_charReader
—
Swift_CharacterReader
The char reader (lazy-loaded) for the current charset. - $_charReaderFactory
—
Swift_CharacterReaderFactory
A factory for creating CharacterReader instances. - $_charset
—
string
The character set this stream is using. - $_currentPos
—
integer
Position in the stream. - $_datas
—
string
The data's stored as-is. - $_datasSize
—
integer
Number of bytes in the stream - $_map
—
mixed
Map. - $_mapType
—
integer
Map Type.
Methods
public
- __construct() — Constructor.
- flushContents()
- importByteStream()
- importString()
- read()
- readBytes()
- setCharacterReaderFactory() — Set the CharacterReaderFactory for multi charset support.
- setCharacterSet() — Set the character set used in this CharacterStream.
- setPointer()
- write()