FileInputStream is used for reading streams of raw bytes such as image data - Core Java

Q.  Which is used for reading streams of raw bytes such as image data and for reading streams of characters, consider using FileReader?
- Published on 22 Jul 15

a. FileInputStream
b. FileOutputStream
c. Both A & B
d. None of the above

ANSWER: FileInputStream
 

    Discussion

  • Prajakta Pandit   -Posted on 14 Dec 15
    - FileInputStream is used for reading streams of raw bytes such as image data and for reading streams of characters, consider using FileReader.

    - It is used to read the byte oriented data, for example to read image, audio, video etc.

    - A FileInputStream obtains input bytes from a file in a file system. What files are available depends on the host environment.

Post your comment / Share knowledge


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)