© Adam L. Davis 2020Adam L. DavisModern Programming Made Easyhttps://doi.org/10.1007/978-1-4842-5569-8_15
Adam L. Davis1
Oviedo, FL, USA
Many times when developing an application, you need to read or write from files or a network connection. These things are generally referred to as input and output or I/O for short.
In this chapter, we will cover some of the utilities available for I/O within Java and the JVM.
In Java, the java.io.File class is used to represent files and directories. For example:
1 File file = new File("path/file.txt");
2 File dir = new File("path/"); //directory
Java 7 added several new classes and interfaces for manipulating files and file systems under the java.nio package. This new application program ...