Swift
[ class tree: Swift ] [ index: Swift ] [ all elements ]

Class: Swift_ByteStream_AbstractFilterableInputStream

Source Location: /vendors/swift/classes/Swift/ByteStream/AbstractFilterableInputStream.php

Class Overview


Provides the base functionality for an InputStream supporting filters.


Author(s):

  • Chris Corbyn

Implements interfaces:

Methods


Child classes:

Swift_Transport_StreamBuffer
A generic IoBuffer implementation supporting remote sockets and local processes.
Swift_ByteStream_FileByteStream
Allows reading and writing of bytes to and from a file.

Class Details

[line 21]
Provides the base functionality for an InputStream supporting filters.



Tags:

author:  Chris Corbyn
abstract:  
filesource:  Source Code for this file


[ Top ]


Class Methods


method addFilter [line 55]

void addFilter( Swift_StreamFilter $filter, string $key)

Add a StreamFilter to this InputByteStream.



Tags:

access:  public



Implementation of:
Swift_Filterable::addFilter()
Add a new StreamFilter, referenced by $key.

Parameters:

Swift_StreamFilter   $filter  
string   $key  

[ Top ]

method bind [line 106]

void bind( Swift_InputByteStream $is)

Attach $is to this stream.

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




Tags:

access:  public



Implementation of:
Swift_InputByteStream::bind()
Attach $is to this stream.

Parameters:

Swift_InputByteStream   $is  

[ Top ]

method commit [line 94]

void commit( )

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



Tags:

throws:  Swift_IoException
access:  public



Implementation of:
Swift_InputByteStream::commit()
For any bytes that are currently buffered inside the stream, force them off the buffer.
[ Top ]

method flushBuffers [line 139]

void flushBuffers( )

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



Tags:

throws:  Swift_IoException
access:  public



Implementation of:
Swift_InputByteStream::flushBuffers()
Flush the contents of the stream (empty it) and set the internal pointer to the beginning.
[ Top ]

method removeFilter [line 64]

void removeFilter( string $key)

Remove an already present StreamFilter based on its $key.



Tags:

access:  public



Implementation of:
Swift_Filterable::removeFilter()
Remove an existing filter using $key.

Parameters:

string   $key  

[ Top ]

method unbind [line 119]

void unbind( Swift_InputByteStream $is)

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.




Tags:

access:  public



Implementation of:
Swift_InputByteStream::unbind()
Remove an already bound stream.

Parameters:

Swift_InputByteStream   $is  

[ Top ]

method write [line 74]

void write( string $bytes)

Writes $bytes to the end of the stream.



Tags:

throws:  Swift_IoException
access:  public



Implementation of:
Swift_InputByteStream::write()
Writes $bytes to the end of the stream.

Parameters:

string   $bytes  

[ Top ]

method _commit [line 42]

void _commit( string $bytes)

Commit the given bytes to the storage medium immediately.



Tags:

abstract:  
access:  protected


Overridden in child classes as:

Swift_Transport_StreamBuffer::_commit()
Write this bytes to the stream
Swift_ByteStream_FileByteStream::_commit()
Just write the bytes to the file

Parameters:

string   $bytes  

[ Top ]

method _flush [line 48]

void _flush( )

Flush any buffers/content with immediate effect.



Tags:

abstract:  
access:  protected


Overridden in child classes as:

Swift_Transport_StreamBuffer::_flush()
Flush the stream contents
Swift_ByteStream_FileByteStream::_flush()
Not used

[ Top ]


Documentation generated on Mon, 05 Sep 2011 20:31:47 -0500 by phpDocumentor 1.4.3