TYPO3
7.6
|
Public Member Functions | |
__construct ($stack=null) | |
read ($length) | |
write ($bytes) | |
commit () | |
bind (Swift_InputByteStream $is) | |
unbind (Swift_InputByteStream $is) | |
setReadPointer ($byteOffset) | |
flushBuffers () | |
Private Attributes | |
$_array = array() | |
$_arraySize = 0 | |
$_offset = 0 | |
$_mirrors = array() | |
Allows reading and writing of bytes to and from an array.
Definition at line 16 of file ArrayByteStream.php.
__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.
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 129 of file ArrayByteStream.php.
commit | ( | ) |
flushBuffers | ( | ) |
Flush the contents of the stream (empty it) and set the internal pointer to the beginning.
Implements Swift_InputByteStream.
Definition at line 174 of file ArrayByteStream.php.
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 77 of file ArrayByteStream.php.
References $_offset.
setReadPointer | ( | $byteOffset | ) |
Move the internal read pointer to $byteOffset in the stream.
int | $byteOffset |
Implements Swift_OutputByteStream.
Definition at line 159 of file ArrayByteStream.php.
References $_arraySize, and elseif.
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 143 of file ArrayByteStream.php.
write | ( | $bytes | ) |
Writes $bytes to the end of the stream.
string | $bytes |
Implements Swift_InputByteStream.
Definition at line 101 of file ArrayByteStream.php.
Referenced by __construct().
|
private |
Definition at line 23 of file ArrayByteStream.php.
|
private |
Definition at line 30 of file ArrayByteStream.php.
Referenced by setReadPointer().
|
private |
Definition at line 44 of file ArrayByteStream.php.
|
private |
Definition at line 37 of file ArrayByteStream.php.
Referenced by read().