Java came with several I/O classes to support input and output across streams and the filesystem. The following is a list of Java I/O examples including file manipulation, encoding, serialization, and compression with zip and Gzip.

The files

Examples showing creating, reading, writing, modifying files.

Serializing a file

Save an Object to a <br /> file Reading an Object from a
file

File compression

Compress a file as ZIP
Unzip a file from ZIP
Compress a file as GZIP
Unzip a file from GZIP
Compress a serialized object into a <br /> file Unzip a serialized object from a Gzip

Temporary file

Create temporary file
Write the data to a temporary file
Delete a temporary file
Get the path of a temporary file

Directories

Create a directory
Delete a directory
Copy a directory
Check if a directory is empty
Get the current directory