DEV Community

Pramod Bablad
Pramod Bablad

Posted on

2 1

Byte Stream Vs Character Stream In Java

Byte Stream In Java :

  1. They process the data byte by byte i.e 8 bits at a time.
  2. They read/write data 8 bits maximum at a time.
  3. They are most suitable to process binary files.
  4. All byte stream classes in Java are descendants of InputStream and OutputStream.

Character Stream In Java :

  1. They process the data character by character.
  2. They read/write data 16 bits maximum at a time.
  3. They are most suitable to process text files.
  4. 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.

Image description

Source : https://javaconceptoftheday.com/byte-stream-vs-character-stream-in-java/

Top comments (0)

Qodo Takeover

Introducing Qodo Gen 1.0: Transform Your Workflow with Agentic AI

Rather than just generating snippets, our agents understand your entire project context, can make decisions, use tools, and carry out tasks autonomously.

Read full post

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay