public void setBufferSize(int size)
getBufferSize
.A larger buffer allows more content to be written before anything is actually sent, thus providing the servlet with more time to set appropriate status codes and headers. A smaller buffer decreases server memory load and allows the client to start receiving data more quickly.
This method must be called before any response body content is written; if content has been written or the response object has been committed, this method throws an IllegalStateException
.
size
- the preferred buffer sizejava.lang.IllegalStateException
- if this method is called after content has been writtengetBufferSize()
, flushBuffer()
, isCommitted()
, reset()