Byte Stream Vs Char Stream Buffer

Discussion in 'Java' started by Roedy Green, May 7, 2014.

  1. Roedy Green

    Silvio Guest

    Thank you Roedy. Interesting results. Kind of surprising as well.


    Silvio, May 18, 2014
    1. Advertisements

  2. Roedy Green


    Nov 20, 2014
    Likes Received:
    A byte stream access the file byte by byte. Java programs use byte streams to perform input and output of 8-bit bytes. It is suitable for any kind of file, however not quite appropriate for text files. For example, if the file is using a unicode encoding and a character is represented with two bytes, the byte stream will treat these separately and you will need to do the conversion yourself.

    A character stream will read a file character by character. Character Stream is a higher level concept than Byte Stream . A Character Stream is, effectively, a Byte Stream that has been wrapped with logic that allows it to output characters from a specific encoding .

    Last edited by a moderator: Jun 13, 2017
    cronynaval, Jun 13, 2017
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.