Interface Swift_CharacterStream
| Implemented by | Swift_CharacterStream_ArrayCharacterStream, Swift_CharacterStream_NgCharacterStream |
|---|
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.
Public Methods
| Method | Description | Defined By |
|---|---|---|
| flushContents() | Empty the stream and reset the internal pointer. | Swift_CharacterStream |
| importByteStream() | Overwrite this character stream using the byte sequence in the byte stream. | Swift_CharacterStream |
| importString() | Import a string a bytes into this CharacterStream, overwriting any existing data in the stream. | Swift_CharacterStream |
| read() | Read $length characters from the stream and move the internal pointer $length further into the stream. | Swift_CharacterStream |
| readBytes() | Read $length characters from the stream and return a 1-dimensional array containing there octet values. | Swift_CharacterStream |
| setCharacterReaderFactory() | Set the CharacterReaderFactory for multi charset support. | Swift_CharacterStream |
| setCharacterSet() | Set the character set used in this CharacterStream. | Swift_CharacterStream |
| setPointer() | Move the internal pointer to $charOffset in the stream. | Swift_CharacterStream |
| write() | Write $chars to the end of the stream. | Swift_CharacterStream |
Method Details
Empty the stream and reset the internal pointer.
| public abstract void flushContents ( ) |
Overwrite this character stream using the byte sequence in the byte stream.
| public abstract 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 abstract void importString ( $string ) | ||
| $string | string | |
Read $length characters from the stream and move the internal pointer $length further into the stream.
| public abstract string read ( $length ) | ||
| $length | int | |
Read $length characters from the stream and return a 1-dimensional array containing there octet values.
| public abstract int readBytes ( $length ) | ||
| $length | int | |
Set the CharacterReaderFactory for multi charset support.
| public abstract void setCharacterReaderFactory ( Swift_CharacterReaderFactory $factory ) | ||
| $factory | Swift_CharacterReaderFactory | |
Set the character set used in this CharacterStream.
| public abstract void setCharacterSet ( $charset ) | ||
| $charset | string | |
Move the internal pointer to $charOffset in the stream.
| public abstract void setPointer ( $charOffset ) | ||
| $charOffset | int | |
Write $chars to the end of the stream.
| public abstract void write ( $chars ) | ||
| $chars | string | |