Geeklog
[ class tree: Geeklog ] [ index: Geeklog ] [ all elements ]

Class: Swift_ByteStream_ArrayByteStream

Source Location: /system/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/ArrayByteStream.php

Class Overview


Allows reading and writing of bytes to and from an array.


Author(s):

  • Chris Corbyn

Implements interfaces:

Methods



Class Details

[line 16]
Allows reading and writing of bytes to and from an array.



Tags:

author:  Chris Corbyn


[ Top ]


Class Methods


constructor __construct [line 53]

Swift_ByteStream_ArrayByteStream __construct( [mixed $stack = null])

Create a new ArrayByteStream.

If $stack is given the stream will be populated with the bytes it contains.




Tags:

access:  public


Parameters:

mixed   $stack   of bytes in string or array form, optional

[ Top ]

method bind [line 127]

void 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.




Tags:

access:  public



Implementation of:
Swift_InputByteStream::bind()
Attach $is to this stream.

Parameters:

Swift_InputByteStream   $is  

[ Top ]

method commit [line 115]

void commit( )

Not used.



Tags:

access:  public



Implementation of:
Swift_InputByteStream::commit()
For any bytes that are currently buffered inside the stream, force them off the buffer.
[ Top ]

method flushBuffers [line 172]

void flushBuffers( )

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



Tags:

access:  public



Implementation of:
Swift_InputByteStream::flushBuffers()
Flush the contents of the stream (empty it) and set the internal pointer to the beginning.
[ Top ]

method read [line 77]

string read( int $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.




Tags:

access:  public



Implementation of:
Swift_OutputByteStream::read()
Reads $length bytes from the stream into a string and moves the pointer through the stream by $length.

Parameters:

int   $length  

[ Top ]

method setReadPointer [line 157]

bool setReadPointer( int $byteOffset)

Move the internal read pointer to $byteOffset in the stream.



Tags:

access:  public



Implementation of:
Swift_OutputByteStream::setReadPointer()
Move the internal read pointer to $byteOffset in the stream.

Parameters:

int   $byteOffset  

[ Top ]

method unbind [line 141]

void 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.




Tags:

access:  public



Implementation of:
Swift_InputByteStream::unbind()
Remove an already bound stream.

Parameters:

Swift_InputByteStream   $is  

[ Top ]

method write [line 99]

void write( string $bytes)

Writes $bytes to the end of the stream.



Tags:

access:  public



Implementation of:
Swift_InputByteStream::write()
Writes $bytes to the end of the stream.

Parameters:

string   $bytes  

[ Top ]


Documentation generated on Sun, 02 Oct 2016 07:43:29 +0000 by phpDocumentor 1.4.3