• Post Reply Bookmark Topic Watch Topic
  • New Topic

What are CharacterStreams and ByteStreams

 
Niranjan Prasad
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are CharacterStreams and ByteStreams?
I need clear concept.
I am trying to understand,but unable,so can anybody provide clear idea

According to me

Primitives are stored with their binary equivalent of ascii in the Memory.

CharacterStream manages charactes
ByteStream manages bytes.
What's the differenc,as I said everything will stored as binary and then what above CharacterStream came into picture?
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24213
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is not on-topic here in the Advanced Java forum; I'm moving it to the I/O and Streams forum.
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24213
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Some alphabets have more characters in them than can be represented by a single byte; hence those alphabets have to be encoded in two or even three-byte codes, or codes that use a variable number of bytes per character. Dozens, if not hundreds, of encodings are in use around the world.

Furthermore, some operating systems insist on using two characters to represent a "end of line," while others use only one.

The difference is that byte streams read raw bytes -- exactly what's in a file -- while character streams handle all the complexities listed above, and translate into nice standardized Unicode characters.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!