Common knowledge in Java

A few notes, observations that I would like to document about Java. This may be common,trivial knowledge, but I just want it to be in one place.

Thursday, June 23, 2005

Byte Streams Character Streams

I can't believe I how people have programmed in Java, myself included, without really understanding how Byte Streams are different from Character Streams. There is an excellent article here
Some pointers:
  • If you see Reader or Writer think character stream and if you see InputStream and OutputStream think bytes.
  • Thumb rule: use byte stream for binary data and character stream for everything else.

0 Comments:

Post a Comment

<< Home