\Swift_ByteStream_AbstractFilterableInputStream
Provides the base functionality for an InputStream supporting filters.
- Author: Chris Corbyn
Synopsis
class Swift_ByteStream_AbstractFilterableInputStream
implements
Swift_InputByteStream,Swift_Filterable
{
- // members
- protected integer $_sequence;
- private array $_filters;
- private string $_writeBuffer;
- private array $_mirrors;
- // methods
- protected abstract void _commit()
- protected abstract void _flush()
- public void addFilter()
- public void removeFilter()
- public integer write()
- public void commit()
- public void bind()
- public void unbind()
- public void flushBuffers()
- private void _filter()
- private void _doWrite()
Hierarchy
Extended by
- Swift_Transport_StreamBuffer
- Swift_ByteStream_FileByteStream
- Swift_ByteStream_TemporaryFileByteStream
Implements
Members
private
-
$_filters
StreamFilters. - $_mirrors
—
array
Bound streams. -
$_writeBuffer
A buffer for writing.
protected
-
$_sequence
Write sequence.
Methods
private
- _doWrite() — Just write the bytes to the stream
- _filter() — Run $bytes through all filters
protected
- _commit() — Commit the given bytes to the storage medium immediately.
- _flush() — Flush any buffers/content with immediate effect.
public
- addFilter() — Add a StreamFilter to this InputByteStream.
- bind() — Attach $is to this stream.
- commit() — For any bytes that are currently buffered inside the stream, force them off the buffer.
- flushBuffers() — Flush the contents of the stream (empty it) and set the internal pointer to the beginning.
- removeFilter() — Remove an already present StreamFilter based on its $key.
- unbind() — Remove an already bound stream.
- write() — Writes $bytes to the end of the stream.