Part of twisted.web2.stream View Source View In Hierarchy
Known implementations: twisted.vfs.adapters.stream.FileSystemLeafStream, twisted.web2.log._LogByteCounter, twisted.web2.stream.CompoundStream, twisted.web2.stream.ProducerStream, twisted.web2.stream.SimpleStream
|Attribute||length||How much data is in this stream. Can be None if unknown.|
|Method||read||Read some data.|
|Method||split||Split this stream into two, at byte position 'point'.|
|Method||close||Prematurely close this stream. Should also cause further reads to return None. Additionally, .length should be set to 0.|
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.
Split this stream into two, at byte position 'point'.
Returns a tuple of (before, after). After calling split, no other methods should be called on this stream. Doing so will have undefined behavior.If you cannot implement split easily, you may implement it as:
return fallbackSplit(self, point)