The Java API native supports IO operations. Java IO is primarily designed to read (input) and write (ouput) data.
Most programs need to process some input data (such as file data, network data, and so on) and produce output based on these input data. Here are a few scenarios where we often encounter:
1. The compression software needs to read the file to be compressed and output the compressed file to another file.
2. When accessing FTP we need to read the network data (using the FTP protocol to read the contents of the FTP server), and we will also write data to the FTP server over the network.
Most of the Java IO-related classes are located in the java.io package. If you look at the classes in the java.io , you will find that there are too many classes under the package, which may confuse you.
I counted it. The java.io package in JDK1.7 contains 86 classes or interfaces. What are the purposes of these classes? What kind of class do we need to choose to complete a particular job?
If you extend the java.io package? You will be a mirror after learning this series!
The classes in Java that are related to input input are not all in the java.io package. For example, output classes that output to the GUI are provided by the JFC framework; the output to the browser class is
Provided by the Servlet API. Java IO focuses on reading and writing file streams, network streams, memory buffers, and so on. When reading the network stream and the network interaction part by the Java
The socket API is responsible.
1.Java IO Overview