Java File I/O
The following examples provide the commonly used functions Java I/O provides. They have been fully tested and can be used directly.
- I/O Class Hierarchy Diagram
- Create a file/directory
- Read a file line by line
- Write to a file
- Append/Add something to a file
- FileOutputStream vs FileWriter
- Java: convert a file to a string
- Transfer content from one file to another
- Java: convert a file to a byte array, then convert byte array to a file.
- Java: convert image to byte array, convert byte array to image