Readers and Writers

Character streams make heavy use of character set converters. They hide the underlying complexity of the conversion process, making it easy for Java programs to be written without knowledge of the internationalizing process. Again, you see that programs are internationalized by default.

The advantages of using character streams over byte streams are many. Although character streams have the added overhead of doing character conversion on top of byte reading, they also allow for more efficient buffering. Byte streams are designed to read information one byte at a time, whereas character streams read one buffer at a time. According to Sun, this fact, combined with a new efficient locking scheme, more than compensates for the ...

Get Special Edition Using Java 2 Standard Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.