Re: which OutputStreams are buffered?
Rex Mottram wrote:
There is a java.io.BufferedOutputStream whose purpose is well
documented, basically as a good thing to wrap around an unbuffered
OutputStream (at least if you want buffering). However, and surprisingly
to me, a number of the other OutputStreams in java.io do not document
whether they are buffered, and thus it's not clear to me whether I
should wrap them or not.
Take FileOutputStream as an example: the docs say only that it's "... an
output stream for writing data to a File ...". Can we safely infer that
a stream is buffered iff it implements Flushable? Otherwise, what's the
way to know when wrapping in a BufferedOutputStream is a good idea and
when it would lead to redundant buffering?
Thanks,
RM
If it doesn't say buffered it isn't.
--
Knute Johnson
email s/nospam/linux/
--
Posted via NewsDemon.com - Premium Uncensored Newsgroup Service
------->>>>>>http://www.NewsDemon.com<<<<<<------
Unlimited Access, Anonymous Accounts, Uncensored Broadband Access