Byte Stream In Java :
- They process the data byte by byte i.e 8 bits at a time.
- They read/write data 8 bits maximum at a time.
- They are most suitable to process binary files.
- All byte stream classes in Java are descendants of InputStream and OutputStream.
Character Stream In Java :
- They process the data character by character.
- They read/write data 16 bits maximum at a time.
- They are most suitable to process text files.
- All character stream classes in Java are descendants of Reader and Writer.
Below image shows some important byte stream classes and character stream classes in Java.
Source : https://javaconceptoftheday.com/byte-stream-vs-character-stream-in-java/
Top comments (0)