Character and Byte stream

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jyohere
    New Member
    • Apr 2007
    • 73

    #1

    Character and Byte stream

    What is the difference between character and byte stream......Pls explain me in detail.......Ho w is the internal mapping done .....its probably very difficult to understand....w hen we read from books....its all vague
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Byte streams are for binary data, i.e. they just read and write bytes (eight bits).
    Character streams read and write character data (Unicode characters). Those
    characters must be translated to and from byte 'storage'. There are several
    en/decoding methods and you must select one if you don't want the default
    en/decoding method. One of the popular methods is UTF-8 because when your
    character data happens to be just ASCII characters, no translation is needed,
    i.e. the bytes are 'transformed' to characters as they are: a single byte for a
    single char and vice versa.

    kind regards,

    Jos

    Comment

    Working...