I am starting a Java tutorial series on NIO. This is the first article and will serve as table of contents for the tutorial series. NIO was introduced in Java for buffer oriented and non blocking IO operations. Before that in Java we had only the standard IO based on streams and blocking IO operations.
First main difference between the standard IO and NIO is, standard IO is based on streams and NIO is buffer oriented. Buffer oriented operations provide as flexibility in handling data. In buffer oriented NIO, data is first read into a buffer and then it is made available for processing. So we can move back and forth in the buffer. But in the case of streams it is not possible.
Second main difference is, blocking and non-blocking IO operations. In case of streams, a thread will be blocked until it completes the IO operation. Wherein the NIO allows for non-blocking operations. If the data is not available for IO operations, then the thread can do something else and need not stay in blocked mode. With channels and selectors a single thread can manage multiple threads and parallel IO operations.
As part of this Java NIO tutorial series, I will be covering the following topics. If you need any other topics to be covered as part of this tutorials, please add your comment.
Comments are closed for "Java NIO Tutorial".
[…] tutorial is part of the Java NIO tutorial series. In this tutorial, we will see about what is a Path and a File with respect to Java NIO. […]
Waiting for new ideas on core java from your side…
Good start on NIO , Joseph. Expecting many more to come. Thanks!!
Thanks party. Sure, planning to cover NIO in the coming days.
[…] tutorial is part of Java NIO tutorial series. In this tutorial, let us get introduced to Files class from java.nio.file package, it […]
These tutorials are good and nice. Easy to understand the concepts.
[…] through what a glob is and how to use it with Java. This tutorial is part of the currently on going Java NIO tutorials […]
It’s nice tutorial for starting with NIO.
[…] this tutorial, I will walk you through writing a TFTP client using Java NIO. This is part of the Java NIO tutorials series. This tutorial will help you understand DatagramChannel, Selector, Path, Paths and Files Java NIO […]
[…] seamless less access to the attributes and a way of manipulating them. This tutorial is part of the Java NIO tutorial […]
[…] Java tutorial is to learn about handling file using Java NIO. This tutorial is part of the Java NIO tutorial series. We will see about basic file operations like how to delete, copy, move a file and […]
[…] let us learn about putting FileVisitor and glob pattern matching into practical use. In the present Java NIO tutorial series we learnt about what is glob and how to use it. Then we saw about how to walk a file tree […]
[…] FileVisitor interface using which we can walk through a file tree. This tutorial is part of the Java NIO tutorial […]
[…] and FileChannel to perform file IO operations. Just wanted to remind you, I am publishing a Java NIO tutorial series and this tutorial is part of it. Go through the NIO Channel tutorial to know more about NIO […]