t.w.s.MemoryStream(SimpleStream) : class documentation

Part of twisted.web2.stream View Source View In Hierarchy

A stream that reads data from a buffer object.
Method __init__ Create the stream from buffer object mem. If you specify start and length, use only that portion of the buffer.
Method read Read some data.
Method close Prematurely close this stream. Should also cause further reads to return None. Additionally, .length should be set to 0.

Inherited from SimpleStream:

Method split Split this stream into two, at byte position 'point'.
def __init__(self, mem, start=0, length=None): (source)
Create the stream from buffer object mem. If you specify start and length, use only that portion of the buffer.
def read(self): (source)

Read some data.

Returns an object conforming to the buffer interface, or if there is no more data available, returns None. Can also return a Deferred resulting in one of the above.

Errors may be indicated by exception or by a Deferred of a Failure.
def close(self): (source)
Prematurely close this stream. Should also cause further reads to return None. Additionally, .length should be set to 0.
API Documentation for Twisted, generated by pydoctor at 2011-10-27 15:57:47.