An abstract means of writing data.
Classes implementing this interface may use a subsystem which requires less memory than working with large strings of data.
package | Swift |
---|---|
subpackage | ByteStream |
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.
commit()
\Swift_IoException |
---|
flushBuffers()
\Swift_IoException |
---|
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.
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).
string
\Swift_IoException |
---|
int