XOOPS RMCommon Utilities
2.1.8.91RC
|
Public Member Functions | |
__construct ($stack=null) | |
bind (Swift_InputByteStream $is) | |
commit () | |
flushBuffers () | |
read ($length) | |
setReadPointer ($byteOffset) | |
unbind (Swift_InputByteStream $is) | |
write ($bytes) | |
Private Attributes | |
$_array = array() | |
$_arraySize = 0 | |
$_mirrors = array() | |
$_offset = 0 | |
Definition at line 20 of file ArrayByteStream.php.
Swift_ByteStream_ArrayByteStream::__construct | ( | $stack = null | ) |
Create a new ArrayByteStream. If $stack is given the stream will be populated with the bytes it contains.
mixed | $stack | of bytes in string or array form, optional |
Definition at line 53 of file ArrayByteStream.php.
References elseif(), and write().
Swift_ByteStream_ArrayByteStream::bind | ( | Swift_InputByteStream | $is | ) |
Attach $is to this stream. The stream acts as an observer, receiving all data that is written. All write() and flushBuffers() operations will be mirrored.
Swift_InputByteStream | $is |
Implements Swift_InputByteStream.
Definition at line 131 of file ArrayByteStream.php.
Swift_ByteStream_ArrayByteStream::commit | ( | ) |
Swift_ByteStream_ArrayByteStream::flushBuffers | ( | ) |
Flush the contents of the stream (empty it) and set the internal pointer to the beginning.
Implements Swift_InputByteStream.
Definition at line 178 of file ArrayByteStream.php.
Swift_ByteStream_ArrayByteStream::read | ( | $length | ) |
Reads $length bytes from the stream into a string and moves the pointer through the stream by $length. If less bytes exist than are requested the remaining bytes are given instead. If no bytes are remaining at all, boolean false is returned.
int | $length |
Implements Swift_OutputByteStream.
Definition at line 78 of file ArrayByteStream.php.
Swift_ByteStream_ArrayByteStream::setReadPointer | ( | $byteOffset | ) |
Move the internal read pointer to $byteOffset in the stream.
int | $byteOffset |
Implements Swift_OutputByteStream.
Definition at line 160 of file ArrayByteStream.php.
References $_arraySize, and elseif().
Swift_ByteStream_ArrayByteStream::unbind | ( | Swift_InputByteStream | $is | ) |
Remove an already bound stream. 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.
Swift_InputByteStream | $is |
Implements Swift_InputByteStream.
Definition at line 144 of file ArrayByteStream.php.
Swift_ByteStream_ArrayByteStream::write | ( | $bytes | ) |
Writes $bytes to the end of the stream.
string | $bytes |
Implements Swift_InputByteStream.
Definition at line 102 of file ArrayByteStream.php.
Referenced by __construct().
|
private |
Definition at line 29 of file ArrayByteStream.php.
|
private |
Definition at line 36 of file ArrayByteStream.php.
Referenced by setReadPointer().
|
private |
Bound streams
Definition at line 46 of file ArrayByteStream.php.
|
private |
Definition at line 43 of file ArrayByteStream.php.
Referenced by read().