Interface Swift_CharacterStream

Implemented bySwift_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

Hide inherited methods

MethodDescriptionDefined 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

flushContents() public abstract method

Empty the stream and reset the internal pointer.

public abstract void flushContents ( )
importByteStream() public abstract method

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

importString() public abstract method

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

public abstract void importString ( $string )
$string string
read() public abstract method

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

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

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

public abstract int readBytes ( $length )
$length int
setCharacterReaderFactory() public abstract method

Set the CharacterReaderFactory for multi charset support.

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

Set the character set used in this CharacterStream.

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

Move the internal pointer to $charOffset in the stream.

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

Write $chars to the end of the stream.

public abstract void write ( $chars )
$chars string