I am not sure about trade offs, but i can tell you it makes no difference to
the speed or efficiency because if you buffer a buffered stream, the
external buffer would have no work to do cos the internal one does it all.
----- Original Message -----
From: "Richard O. Hammer" <[EMAIL PROTECTED]>
To: "Java Users Group" <[EMAIL PROTECTED]>
Sent: Monday, October 20, 2003 4:41 PM
Subject: [Juglist] buffers on buffers?


> Is double buffering ever a good idea?
>
> Here are two lines of code from a class of mine:
> InputStream in = new BufferedInputStream( socket.getInputStream(), 1024 );
> BufferedReader smtpCommandLineReader = new BufferedReader(new
> InputStreamReader(in));
>
> Is it good, or is it stupid, to build a BufferedReader with a
> BufferedInputStream?  Why?  Are there underlying tradeoffs?
>
> Thanks,
> Rich Hammer
>
>
>
> _______________________________________________
> Juglist mailing list
> [EMAIL PROTECTED]
> http://trijug.org/mailman/listinfo/juglist_trijug.org
>
>



_______________________________________________
Juglist mailing list
[EMAIL PROTECTED]
http://trijug.org/mailman/listinfo/juglist_trijug.org

Reply via email to