||This is a response stream to the client.|
The key attributes of this class are:
If True, the stream will automatically start sending data
once it has accumulated `_bufferSize` data. This means that
it will ask the response to commit itself, without developer
interaction. By default, this is set to False.
The size of the data buffer. This is only used when autocommit
is True. If not using autocommit, the whole response is
buffered and sent in one shot when the servlet is done.
Send the accumulated response data now. Will ask the `Response`
to commit if it hasn't already done so.
||Methods defined here:|
- __init__(self, autoCommit=False, bufferSize=8192)
- Get the auto commit mode.
- Return accumulated data which has not yet been flushed.
We want to be able to get at this data without having to call flush
first, so that we can (for example) integrate automatic HTML validation.
- Get the buffer size.
- Try to clear any accumulated response data.
Will fail if the response is already sommitted.
- Close this buffer. No more data may be sent.
- Check whether we are closed to new data.
- commit(self, autoCommit=True)
- Called by the Response to tell us to go.
If `_autoCommit` is True, then we will be placed into autoCommit mode.
- Are we committed?
- Flush stream.
Send available data as soon as possible, i.e. *now*.
Returns True if we are ready to send, otherwise False (i.e.,
if the buffer is full enough).
- Request for commitment.
Called by the `HTTPResponse` instance that is using this instance
to ask if the response needs to be prepared to be delivered.
The response should then commit its headers, etc.
- pop(self, count)
- Remove count bytes from the front of the buffer.
- prepend(self, charstr)
- Add the attached string to front of the response buffer.
Invalid if we are already committed.
- setAutoCommit(self, autoCommit=True)
- Set the auto commit mode.
- setBufferSize(self, bufferSize=8192)
- Set the buffer size.
- Return the current size of the data held here.
- write(self, charstr)
- Write a string to the buffer.
Data descriptors defined here:
- dictionary for instance variables (if defined)
- list of weak references to the object (if defined)