Package yawPyCrypto :: Module _StreamBase :: Class InputStream
[show private | hide private]
[frames | no frames]

Class InputStream

object --+    
         |    
StreamBase --+
             |
            InputStream

Known Subclasses:
DecryptStream

Class that implements an input stream. It accepts input data, and tries to read packets from the data. This class should never be instantiated directly.
Method Summary
  __init__(self)
Initialize the input stream.
a new object with type S, a subtype of T __new__(S, ...)
  _checkInst(self)
Check the current stream instance.
  _feedInput(self, data)
Feed input to the stream.
  _feedOutput(self, data)
Feed data to the output buffer.
  _feedPacket(self, ptype, pdata)
Function called to feed a packet from the input stream.
  _finishInput(self)
Finish the input stream by checking whether there is still data waiting or a continuation which is not finished.
  _StreamBase__getData(self)
Retrieve the data from the output property as a string. (inherited from StreamBase)
  _writeOutput(self, data)
Append data to the output. (inherited from StreamBase)

Method Details

__init__(self)
(Constructor)

Initialize the input stream. This creates the buffers which are needed to accomodate stream fragmentation.

__new__(S, ...)

Returns:
a new object with type S, a subtype of T

_checkInst(self)

Check the current stream instance.

_feedInput(self, data)

Feed input to the stream. This appends the input to the current stream buffer, and seeks for all packets that can be found therein. It calls the _feedPacket function, which recieves the packet, and the packet type, as read from the stream.

_feedOutput(self, data)

Feed data to the output buffer.

_feedPacket(self, ptype, pdata)

Function called to feed a packet from the input stream. This function by default raises a NotImplementedError to make you aware that it is purely virtual.

_finishInput(self)

Finish the input stream by checking whether there is still data waiting or a continuation which is not finished. In case there is, the stream is invalid.

Generated by Epydoc 1.1 on Sun Aug 17 03:32:35 2003 http://epydoc.sf.net