Abstract Class Swift_ByteStream_AbstractFilterableInputStream

InheritanceSwift_ByteStream_AbstractFilterableInputStream
ImplementsSwift_Filterable, Swift_InputByteStream
SubclassesSwift_ByteStream_FileByteStream, Swift_ByteStream_TemporaryFileByteStream, Swift_Transport_StreamBuffer

Provides the base functionality for an InputStream supporting filters.

Protected Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$_sequence Write sequence. Swift_ByteStream_AbstractFilterableInputStream

Public Methods

Hide inherited methods

MethodDescriptionDefined By
addFilter() Add a StreamFilter to this InputByteStream. Swift_ByteStream_AbstractFilterableInputStream
bind() Attach $is to this stream. Swift_ByteStream_AbstractFilterableInputStream
commit() For any bytes that are currently buffered inside the stream, force them off the buffer. Swift_ByteStream_AbstractFilterableInputStream
flushBuffers() Flush the contents of the stream (empty it) and set the internal pointer to the beginning. Swift_ByteStream_AbstractFilterableInputStream
removeFilter() Remove an already present StreamFilter based on its $key. Swift_ByteStream_AbstractFilterableInputStream
unbind() Remove an already bound stream. Swift_ByteStream_AbstractFilterableInputStream
write() Writes $bytes to the end of the stream. Swift_ByteStream_AbstractFilterableInputStream

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
_commit() Commit the given bytes to the storage medium immediately. Swift_ByteStream_AbstractFilterableInputStream
_flush() Flush any buffers/content with immediate effect. Swift_ByteStream_AbstractFilterableInputStream

Property Details

$_sequence protected property
protected $_sequence 0

Method Details

_commit() protected abstract method

Commit the given bytes to the storage medium immediately.

protected abstract void _commit ( $bytes )
$bytes string
_flush() protected abstract method

Flush any buffers/content with immediate effect.

protected abstract void _flush ( )
addFilter() public method

Add a StreamFilter to this InputByteStream.

public void addFilter ( Swift_StreamFilter $filter, $key )
$filter Swift_StreamFilter
$key string
bind() public method

Attach $is to this stream.

The stream acts as an observer, receiving all data that is written. All {@link write()} and {@link flushBuffers()} operations will be mirrored.

public void bind ( Swift_InputByteStream $is )
$is Swift_InputByteStream
commit() public method

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

public void commit ( )
throws Swift_IoException
flushBuffers() public method

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

public void flushBuffers ( )
throws Swift_IoException
removeFilter() public method

Remove an already present StreamFilter based on its $key.

public void removeFilter ( $key )
$key string
unbind() public method

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 void unbind ( Swift_InputByteStream $is )
$is Swift_InputByteStream
write() public method

Writes $bytes to the end of the stream.

public int write ( $bytes )
$bytes string
throws Swift_IoException