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

Class: Swift_InputByteStream

Source Location: /vendors/swift/classes/Swift/InputByteStream.php

Interface Overview


An abstract means of writing data.


Author(s):

  • Chris Corbyn

Methods


Child classes:

Swift_Transport_IoBuffer
Buffers input and output to a resource.
Swift_KeyCache_KeyCacheInputStream
Writes data to a KeyCache using a stream.

Class Details

[line 19]
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
filesource:  Source Code for this file


[ Top ]


Class Methods


method bind [line 53]

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


Parameters:

Swift_InputByteStream   $is  

[ Top ]

method commit [line 44]

void commit( )

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



Tags:

throws:  Swift_IoException
access:  public


[ Top ]

method flushBuffers [line 70]

void flushBuffers( )

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



Tags:

throws:  Swift_IoException
access:  public


[ Top ]

method unbind [line 63]

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


Parameters:

Swift_InputByteStream   $is  

[ Top ]

method write [line 36]

int write( string $bytes)

Writes $bytes to the end of the stream.

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).




Tags:

throws:  Swift_IoException
access:  public


Parameters:

string   $bytes  

[ Top ]


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