"Dan Sandberg" <[EMAIL PROTECTED]> wrote:

>> Please note that the example uses a PrintWriter, and not a
>> BufferedWriter.  Looking at the source of PrintWriter, all of the
>> println() methods write the data to the underlying OutputStream -
>> characters are not buffered Writer level.  If there is any buffering,
>> it occurs in the OutputStream provided by the container, and is
>> therefore available to the container.
>> It isn't any different than obtaining the OutputStream from the
>> container, writing bytes to it, and then not calling flush on the
>> OutputStream:
> 
> It's funny, I was just looking at this yesterday because I was having a
> problem similar to what you are describing.
> 
> from java.io.PrintWriter ( JDK1.40 ):
> 
>   public PrintWriter(OutputStream out, boolean autoFlush) {
>   this(new BufferedWriter(new OutputStreamWriter(out)), autoFlush);
>   }
> 
> So yes, it is buffered :(.

Yes, and autoflush actually means that's going to call flush in finalize()
so when the Garbage Collector runs, if I'm not wrong (not positive about JDK
1.4 because I donšt use it)

    Pier

--
I think that it's extremely foolish to name a server after the current U.S.
President.                                                 B.W. Fitzpatrick



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to