Documentation

Swift_CharacterStream_NgCharacterStream
in package
implements Swift_CharacterStream

A CharacterStream implementation which stores characters in an internal array.

Tags
author

Xavier De Cock xdecock@gmail.com

Interfaces, Classes and Traits

Swift_CharacterStream
An abstract means of reading and writing data in terms of characters as opposed to bytes.

Table of Contents

$charCount  : int
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  : int
Position in the stream.
$datas  : string
The data's stored as-is.
$datasSize  : int
Number of bytes in the stream.
$map  : mixed
Map.
$mapType  : int
Map Type.
__construct()  : mixed
Constructor.
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.

Properties

Methods

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
Tags
see
Swift_CharacterStream::read()
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
Tags
see
Swift_CharacterStream::readBytes()
Return values
array<string|int, int>

setCharacterSet()

Set the character set used in this CharacterStream.

public setCharacterSet(string $charset) : mixed
Parameters
$charset : string
Return values
mixed

Search results