PHP Класс Swift_ByteStream_ArrayByteStream, Halite

Автор: Chris Corbyn
Наследование: implements Swift_InputByteStream, implements Swift_OutputByteStream
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( mixed $stack = null ) Create a new ArrayByteStream.
bind ( Swift_InputByteStream $is ) Attach $is to this stream.
commit ( ) Not used.
flushBuffers ( ) Flush the contents of the stream (empty it) and set the internal pointer to the beginning.
read ( integer $length ) : string Reads $length bytes from the stream into a string and moves the pointer through the stream by $length.
setReadPointer ( integer $byteOffset ) : boolean Move the internal read pointer to $byteOffset in the stream.
unbind ( Swift_InputByteStream $is ) Remove an already bound stream.
write ( string $bytes ) Writes $bytes to the end of the stream.

Описание методов

__construct() публичный Метод

If $stack is given the stream will be populated with the bytes it contains.
public __construct ( mixed $stack = null )
$stack mixed of bytes in string or array form, optional

bind() публичный Метод

The stream acts as an observer, receiving all data that is written. All {@link write()} and {@link flushBuffers()} operations will be mirrored.
public bind ( Swift_InputByteStream $is )
$is Swift_InputByteStream

commit() публичный Метод

Not used.
public commit ( )

flushBuffers() публичный Метод

Flush the contents of the stream (empty it) and set the internal pointer to the beginning.
public flushBuffers ( )

read() публичный Метод

If less bytes exist than are requested the remaining bytes are given instead. If no bytes are remaining at all, boolean false is returned.
public read ( integer $length ) : string
$length integer
Результат string

setReadPointer() публичный Метод

Move the internal read pointer to $byteOffset in the stream.
public setReadPointer ( integer $byteOffset ) : boolean
$byteOffset integer
Результат boolean

unbind() публичный Метод

If $is is not bound, no errors will be raised. If the stream currently has any buffered data it will be written to $is before unbinding occurs.
public unbind ( Swift_InputByteStream $is )
$is Swift_InputByteStream

write() публичный Метод

Writes $bytes to the end of the stream.
public write ( string $bytes )
$bytes string