1 Preface Some time ago, I was involved in locating a problem with Tomcat that involved a sendfile system call. I suddenly thought of some of my previous experience with Java, and knew that there was a lot of open source software in the Java space that applied zero-copy to improve its performance, so I came up with this article. Look at these familiar software, have you ever understood the technical points behind their application:
delete () method Deletes a file directly when the delete () method is called, regardless of whether the file exists or not, and executes it as soon as it is called.
deleteOnExit () method When the deleteOnExit () method is called, it is only equivalent to a declaration of deleteOnExit (), and the deleteOnExit () method is really called when the program is finished running and the JVM is terminated to achieve the delete operation.
Introduction The full name of IO is input output, is the bridge between the java program and the outside world, IO refers to all the classes in the java.io package, they exist from java 1.0. NIO is called new IO, is the new generation of IO introduced in java 1.4.
What is the nature of IO? What is the difference between it and NIO? How do we learn IO and NIO?
Preface PipedInputStream and PipedOutputStream are designed to solve cross-thread byte data transfers. They always come in pairs and can only be used on two different threads, using piped input and output streams in one thread can cause deadlocks. In some business scenarios, using pipeline streams will increase the speed of file uploads and reduce CPU and IO overhead, this is very practical, so this article talks about Practical application scenarios for pipeline stream.