You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Jason Hunter <jh...@acm.org> on 2000/03/18 03:22:27 UTC
PrintWriter.flush() a no-op?
The code in BufferedServletOutputStream says this:
// If a servlet is using PrintWriter then this method is NO-OP.
public void flush() throws IOException {
if (this.usingWriter == false)
reallyFlush();
}
Why would out.flush() be a no-op when using a PrintWriter? I'd like to
make it a real flush so out.checkError() works again.
-jh-
Re: PrintWriter.flush() a no-op?
Posted by Costin Manolache <Co...@eng.sun.com>.
Jason Hunter wrote:
> No response yet. Going once, going twice...
>
> -jh-
It's a bug probably. ( it got cut&pasted from
org.apache.tomcat.server.ServletOutputStream )
I think it's ok to fix it, I assumed it was just a fix for some writer
buffering problems & servlet buffering, but never had time to find
what was the original problem.
Costin
>
> Jason Hunter wrote:
> >
> > The code in BufferedServletOutputStream says this:
> >
> > // If a servlet is using PrintWriter then this method is NO-OP.
> > public void flush() throws IOException {
> > if (this.usingWriter == false)
> > reallyFlush();
> > }
> >
> > Why would out.flush() be a no-op when using a PrintWriter?
> > I'd like to
> > make it a real flush so out.checkError() works again.
> >
> > -jh-
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
Re: PrintWriter.flush() a no-op?
Posted by Jason Hunter <jh...@acm.org>.
No response yet. Going once, going twice...
-jh-
Jason Hunter wrote:
>
> The code in BufferedServletOutputStream says this:
>
> // If a servlet is using PrintWriter then this method is NO-OP.
> public void flush() throws IOException {
> if (this.usingWriter == false)
> reallyFlush();
> }
>
> Why would out.flush() be a no-op when using a PrintWriter?
> I'd like to
> make it a real flush so out.checkError() works again.
>
> -jh-