FileInputStream Vs. FileOutputStream

Java Input & Output Operations, Handling Flat Files, Handling Excel Files and handling Database Files. Read Input, Write output on the console, Read Files, Write Files, Compare Data and Manipulate File Data.
Post Reply
AyubHussain
Posts: 138
Joined: Fri Nov 23, 2018 2:48 am

FileInputStream Vs. FileOutputStream

Post by AyubHussain » Thu Dec 06, 2018 7:02 am

What are FileInputStream and FileOutputStream?

manoj
Posts: 87
Joined: Fri Nov 23, 2018 5:29 am

Re: FileInputStream Vs. FileOutputStream

Post by manoj » Thu Dec 06, 2018 7:03 am

These two are general purpose classes used by the programmer very often to copy file to file. These classes work well with files containing less data of a few thousand bytes as by performance these are very poor.
For larger data, it is preferred to use BufferedInputStream (or BufferedReader) and BufferedOutputStream (or BufferedWriter).

Post Reply

Return to “Java IO & File Handling”