BufferedPrintWriter
implements buffering for the PrintWriter
returned by the {@link org.apache.sling.api.SlingHttpServletResponse#getWriter()} method. We need this additional buffering class for the {@link org.apache.sling.api.SlingHttpServletResponse#getWriter()} class becausewe wrap the original PrintWriter
retrieved from the servlet container with optional caching and link checking writers.
This class overwrites all the base class's write methods, which are used as the base for writing. All other methods of the base class use the write methods after having formatted the parameter.
The buffer is flushed to the wrapped writer in the following cases :
This class is not multithread safe as it is intended to be used on single requests which are assigned to single threads.
This extension to the PrintWriter
class does not support automatic flush of the output buffer. That is, the println
method never ever flushes output.
|
|