The JspWriter docs say, "If the page is not buffered, output written to this JspWriter object will be written through to the PrintWriter directly.... But if the page is buffered, the PrintWriter object will not be created until the buffer is flushed".
The PrintWriter docs show a flush() method, which makes me think it's somehow buffered, too. It seems strange to have a buffered JspWriter send data to a buffered PrintWriter. I'm new to this so I thi开发者_运维百科nk I must be missing something here. Is that really what's going on?
Thanks.
All output classes have a flush method which simply don't do anything if the class doesn't buffer the data.
The reason for this is that you can give a PrintWriter
both a buffered and an unbuffered output. PrintWriter
couldn't support flush()
for either if not both of them implemented the method.
精彩评论