Class Swift_ByteStream_ArrayByteStream
Allows reading and writing of bytes to and from an array.
- Swift_ByteStream_ArrayByteStream implements Swift_InputByteStream, Swift_OutputByteStream
Author: Chris Corbyn
Located at vendors/swiftmailer/lib/classes/Swift/ByteStream/ArrayByteStream.php
Methods summary
public
|
#
__construct( mixed $stack = null )
Create a new ArrayByteStream. If $stack is given the stream will be populated with the bytes it contains. |
public
string
|
#
read( integer $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. |
public
integer
|
|
public
|
|
public
|
#
bind(
Attach $is to this stream. The stream acts as an observer, receiving all data
that is written. All |
public
|
#
unbind(
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. |
public
boolean
|
#
setReadPointer( integer $byteOffset )
Move the internal read pointer to $byteOffset in the stream. |
public
|
#
flushBuffers( )
Flush the contents of the stream (empty it) and set the internal pointer to the beginning. |
Magic methods summary
Properties summary
private
string[]
|
$_array |
#
The internal stack of bytes. |
private
integer
|
$_arraySize |
#
The size of the stack |
private
integer
|
$_offset |
#
The internal pointer offset. |
private
array
|
$_mirrors |
#
Bound streams |