Discussion Locked

Improve performance with buffered IO

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
The Nov. 14 Java TechMail, "Improve performance with buffered IO," discussed Java's ability to buffer input/output and how it can greatly improve the performance of many applications. Tell us what performance improvements you achieved using Java's buffered IO?

2 replies

by avia

I think it's important to note that the "*Reader" and "*Writer" classes are (as far as I know) for use with textual data (like ASCII), whereas the "*Stream" classes are for non-textual data.
[I don't recall that being mentioned in the article.]

Cheers,
Avi.

by bayard-generationjava

There is this bit at the end :)

"Any Reader/Writer can be Buffered to improve the
speed of
character input/output, and any OutputStream/
InputStream can be Buffered
to improve the byte IO speed."

But it doesn't really stress the difference between writer/
readers and streams. Which I would state as:

Streams are for bytes. Nothing more or less. There are
however bits that sit on top of those streams which
convert other things to bytes, ie) ObjectOutputStream,
object to bytes.

Readers and Writers sit on top of streams and handle
the conversion of different encodings of characters, into
bytes.

In simpler terms, the separation is that streams deal in
byte[] and reader/writers in String.

[i'm being far too verbose tonight...]

This discussion is closed to new replies.