I have written several tutorials on Java I/O. You can find out the links of all the tutorials below. The tutorials are explained with the help of very basic and simple examples so that even a beginner can learn with ease. I will continue to write more tutorials on I/O and will add the links below.
Create File
Read File
1) How to read a file in java using BufferedInputStream
2) How to read a file in java using BufferedReader
Write/Append File
1) How to write to a file in java using FileOutputStream
2) How to write to file in Java using BufferedWriter
3) Append to a file in java using BufferedWriter, PrintWriter, FileWriter
Delete/Rename File
1) How to delete file in Java using delete() Method
2) How to rename file in Java using renameTo() method
File compression
How to compress a File in GZip format
Misc
1) How to Copy a File to another File in Java
2) How to get the last modified date of a file in java
3) How to make a File Read Only in Java
4) How to check if a File is hidden
Ibad says
You are awesome! I love the stuff you have put on this site and I’m excited to see more in the future.
It is well explained and easy to understand.
Thank You.
Ibad
Isaac Tamba Issa says
Acknowledge every bit of this tutorial. It give me a deep insight in java
Dawit Tekie says
I have got enough knowledge about I/O stream so I want to say Thanks for your clear reference that you have uploaded
Abbas says
Hi,
I’m a student of MSc.IT. I just want to thank you for sharing such an awesome blog with us.
GOD bless you. You are really doing a good job.
Please upload some more programs of file handling. I would be very thankful to you.
Truly;
Abbas
Luqman says
Thanks for all the great, easy to understand tutorials. I just finished with the java collection framework on your website. Now it’s time to learn Java IO. Am confident its gonna be pretty fun as usual. Let’s go.
abhilash v sringar says
u are making java easy for me!!!!!! thank you
Vishnu says
hi programs are very helpful,i need to read a whole sentence from console (user input) and write into a .txt file,i tried a lot but only the first word is taken by the reader,can u solve this for me??