Buffers input and output to a resource.
Classes implementing this interface may use a subsystem which requires less memory than working with large strings of data.
package | Swift |
---|---|
subpackage | Transport |
author | Chris Corbyn |
bind(\Swift_InputByteStream $is)
The stream acts as an observer, receiving all data that is written. All write() and flushBuffers() operations will be mirrored.
inherited_from | \Swift_InputByteStream::bind() |
---|
commit()
flushBuffers()
initialize(array $params)
Parameters will vary depending upon the type of IoBuffer used.
array
readLine(int $sequence) : string
The $sequence number comes from any writes and may or may not be used depending upon the implementation.
int
of last write to scan from
string
setParam(string $param, mixed $value)
switching to SSL).
string
mixed
setWriteTranslations(array $replacements)
This could replace LF with CRLF for example.
string[]
terminate()
unbind(\Swift_InputByteStream $is)
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.
inherited_from | \Swift_InputByteStream::unbind() |
---|
write(string $bytes) : int
Writing may not happen immediately if the stream chooses to buffer. If you want to write these bytes with immediate effect, call commit() after calling write().
This method returns the sequence ID of the write (i.e. 1 for first, 2 for second, etc etc).
inherited_from | \Swift_InputByteStream::write() |
---|
string
\Swift_IoException |
---|
int
TYPE_PROCESS
TYPE_SOCKET