Swift_CharacterStream
in
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.
Tags
Table of Contents
- flushContents() : mixed
- Empty the stream and reset the internal pointer.
- importByteStream() : mixed
- Overwrite this character stream using the byte sequence in the byte stream.
- importString() : mixed
- Import a string a bytes into this CharacterStream, overwriting any existing data in the stream.
- read() : string
- Read $length characters from the stream and move the internal pointer $length further into the stream.
- readBytes() : array<string|int, int>
- Read $length characters from the stream and return a 1-dimensional array containing there octet values.
- setCharacterReaderFactory() : mixed
- Set the CharacterReaderFactory for multi charset support.
- setCharacterSet() : mixed
- Set the character set used in this CharacterStream.
- setPointer() : mixed
- Move the internal pointer to $charOffset in the stream.
- write() : mixed
- Write $chars to the end of the stream.
Methods
flushContents()
Empty the stream and reset the internal pointer.
public
flushContents() : mixed
Return values
mixed —importByteStream()
Overwrite this character stream using the byte sequence in the byte stream.
public
importByteStream(Swift_OutputByteStream $os) : mixed
Parameters
- $os : Swift_OutputByteStream
-
output stream to read from
Return values
mixed —importString()
Import a string a bytes into this CharacterStream, overwriting any existing data in the stream.
public
importString(string $string) : mixed
Parameters
- $string : string
Return values
mixed —read()
Read $length characters from the stream and move the internal pointer $length further into the stream.
public
read(int $length) : string
Parameters
- $length : int
Return values
string —readBytes()
Read $length characters from the stream and return a 1-dimensional array containing there octet values.
public
readBytes(int $length) : array<string|int, int>
Parameters
- $length : int
Return values
array<string|int, int> —setCharacterReaderFactory()
Set the CharacterReaderFactory for multi charset support.
public
setCharacterReaderFactory(Swift_CharacterReaderFactory $factory) : mixed
Parameters
- $factory : Swift_CharacterReaderFactory
Return values
mixed —setCharacterSet()
Set the character set used in this CharacterStream.
public
setCharacterSet(string $charset) : mixed
Parameters
- $charset : string
Return values
mixed —setPointer()
Move the internal pointer to $charOffset in the stream.
public
setPointer(int $charOffset) : mixed
Parameters
- $charOffset : int
Return values
mixed —write()
Write $chars to the end of the stream.
public
write(string $chars) : mixed
Parameters
- $chars : string