Java I/O Tutorial

Java comes with many handy I/O classes to support the input and output through bytes stream and file system. Here’s a list of the Java I/O examples including file, temporary file and directory manipulation, encoding, serialized and also compression with zip or Gzip.
Happy learning Java I/O :)
File
List of the File examples to show the use of Java I/O to create, read, write, modify file and get the file’s information.
- Create a file
- Construct file path
- Set the file permission
- Read file with BufferedInputStream
- Read file with BufferedReader
- Write file with FileOutputStream
- Write file with BufferedWriter
- Append content to file
- Delete a file
- Delete files with certain extension only
- Find files with certain extension only
- Rename a file
- Copy a file
- Move a file to another directory
- Get the file creation date
- Get the file last modified date
- Change the file last modified date
- Make a file read only
- Get file size
- Get the filepath of a file
- Get the total number of lines of a file
- Check if a file exists
- Check if a file is hidden
- Read UTF-8 encoded data from a file
- Write UTF-8 encoded data into a file
- Assign file content into a variable
- Generate a file checksum value
- Convert File into an array of bytes
- Convert array of bytes into File
- Convert String to InputStream
- Convert InputStream to String
- Convert File to Hex
- Get total of free disk space in your partition or volume
File Serialization
Take any object that implements the Serialization interface, convert it into bytes and store it into file; The file can be fully restore back to the original object later.
File Compression
File compression examples, ZIP and GZip.
- Compress files in ZIP format
- Decompress files from a ZIP file
- Compress a file in GZIP format
- Decompress file from GZIP file
- Compress serialized object into file
- Decompress serialized object from a Gzip file
Temporary File
List of the temporary file manipulation examples.
Directory
List of the directory manipulation examples.
- Create directory
- Delete directory
- Copy directory
- Traverse /List a directory structure
- Check if directory is empty
- Get the current working directory
Console IO
List of the Console IO examples.






[...] http://www.mkyong.com/tutorials/java-io-tutorials/ [...]
Respected sir,
I have searched very much but i did not come to know yet that how to read a audio file in java.
thanking you,
Playing audio clips in applets is quite simple and involves the following steps:
Create an AudioClip object
Load .au sound file into AudioClip
Play sounds once or loop continuously
Stop playback
This site is awesome for learning java.. Great Man !!
you can check it for basic learning in java
Hi. i have interest in java. but i have no knowledge about it. can u pls put me through.Thanks
How could i help?
I have basic knowledge of C++, Should I start practicing java basics
Yes, you should :)
you can learn java easily but you should practice………….for it
Hi,
As a novice of Java, the articles in your website are useful to me. Can I translate and publish them in my network?
Thinks.
Yours.
Yes, you are free to translate it. But, with a credit link back to original post.
Hi Yong,
http://www.mkyong.com is my favourite site and I strictly followed and learned Spring AOP 2.5. As per my current project I need to convert single threaded application to multithreading. can you please add some notes/recommendations for that. I’m a beginner for threading and never implemented in my whole career
Thanks
Sudar