rankz_VtujUdhflsoFhdgp Byte streams and character streams in java - All type study material

Java programming

Java programming

About Me

my self - Harvendra Singh

Search This Blog

Thursday, February 13, 2020

Byte streams and character streams in java

Byte streams -

  • A stream is a method to sequentially access a file
  • I/O stream means an input source or output destination representing different types of sources e.g. disk files. 
  • The Java.io package provides classes that allow you convert between Unicode character streams and byte streams of non-Unicode text. 
     
    Stream - A sequence of data.

   Input stream : reads data from source. 

  Output stream : writes data to     destination.


Character stream -
  • In Java character are stored using Unicode conventions (refer this for details). 
  • Character stream automatically allows us to read/write data character by character. for example file reader and file writer are character streams used to read from source and write to destination.
  •   Character streams are intended exclusively for character.
  • Byte streams are intended for general purpose input and output. 
    
                                  https://Erhsmathur.blogspot.com


          
     

2 comments: