This post covers common I/O tasks in modern Java, especially in web applications. It discusses reading and writing text files, working with ZIP files, creating temporary files or directories, and highlights the significant API improvements since Java 8. Key points include the default shift to UTF-8 in Java 18, and the obsolescence of certain older classes like java.io.File in favor of java.nio.file.Files and other newer classes.

8m read timeFrom inside.java
Post cover image
Table of contents
IntroductionReading Text FilesWriting Text FilesReading From an Input StreamThe Files APIConclusion

Sort: