Documentation

Swift_InputByteStream

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.

Tags
author

Chris Corbyn

Table of Contents

bind()  : mixed
Attach $is to this stream.
commit()  : mixed
For any bytes that are currently buffered inside the stream, force them off the buffer.
flushBuffers()  : mixed
Flush the contents of the stream (empty it) and set the internal pointer to the beginning.
unbind()  : mixed
Remove an already bound stream.
write()  : int
Writes $bytes to the end of the stream.

Methods

commit()

For any bytes that are currently buffered inside the stream, force them off the buffer.

public commit() : mixed
Tags
throws
Swift_IoException
Return values
mixed

flushBuffers()

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

public flushBuffers() : mixed
Tags
throws
Swift_IoException
Return values
mixed

unbind()

Remove an already bound stream.

public unbind(Swift_InputByteStream $is) : mixed

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.

Parameters
$is : Swift_InputByteStream
Return values
mixed

write()

Writes $bytes to the end of the stream.

public 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 after calling write().

This method returns the sequence ID of the write (i.e. 1 for first, 2 for second, etc etc).

Parameters
$bytes : string
Tags
throws
Swift_IoException
Return values
int

Search results