t.w.s.BufferedStream(object) : class documentation

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

A stream which buffers its data to provide operations like readline and readExactly.
Method __init__ Undocumented
Method readExactly Read exactly size bytes of data, or, if size is None, read the entire stream into a string.
Method readline Read a line of data from the string, bounded by delimiter. The delimiter is included in the return value.
Method pushback Push data back into the buffer.
Method read Undocumented
Method split Undocumented
Method _readUntil Internal helper function which repeatedly calls f each time after more data has been received, until it returns non-None.
Method _len Undocumented
def __init__(self, stream): (source)
Undocumented
def _readUntil(self, f): (source)
Internal helper function which repeatedly calls f each time after more data has been received, until it returns non-None.
def readExactly(self, size=None): (source)
Read exactly size bytes of data, or, if size is None, read the entire stream into a string.
def readline(self, delimiter='\r\n', size=None): (source)

Read a line of data from the string, bounded by delimiter. The delimiter is included in the return value.

If size is specified, read and return at most that many bytes, even if the delimiter has not yet been reached. If the size limit falls within a delimiter, the rest of the delimiter, and the next line will be returned together.
def pushback(self, pushed): (source)
Push data back into the buffer.
def read(self): (source)
Undocumented
def _len(self): (source)
Undocumented
def split(self, offset): (source)
Undocumented
API Documentation for Twisted, generated by pydoctor at 2011-10-27 15:57:47.