Java New Input/Output

In Java, the New I/O (NIO) API, introduced in Java 1.4, provides a more flexible and efficient way to perform input and output operations compared to the traditional I/O (java.io) API. The NIO API is part of the java.nio package and is particularly useful for building high-performance network applications and file handling tasks.

Related Tags

Tutorials

java io

Java IO (Input/Output) Tutorials

Java IO is a collection of APIs targeted at reading and writing data from various sources to several targets. For example, we can read data from a file or over a network, write to a file or write a response back over the network. This page categorizes the various IO-related common tasks into a logical grouping so …

Java MappedByteBuffer

Learn about Java memory-mapped files and learn to read and write content from a memory mapped file with the help of RandomAccessFile and MemoryMappedBuffer. 1. Java Memory-mapped IO If you know how java IO works at lower level, then you will be aware of buffer handling, memory paging and other …

Java NIO Vectored IO

Java NIO Channels provide an important new capability known as scatter/gather (referred to in some circles as vectored I/O). Scatter/gather is a simple yet powerful concept. Scatter/gather is a technique through which bytes can be read from a stream into a set of buffers (vectors) with a single read() invocation …

Java NIO Channel Tutorial

Channels are the second major addition to java.nio after buffers which we have learned in my previous tutorial in detail. Channels provide direct connection to the I/O services. A Channel is a medium that transports data efficiently between byte buffers and the entity on the other end of the channel …

Java NIO Buffer Tutorial

Java Buffer classes are the foundation upon which java.nio is built. In this tutorial, we will take a closer look at the buffers. We will discover the various buffer types, and learn how to use them. We’ll then see how the java.nio buffers relate to the Channel classes of java.nio.channels. …

Java Standard IO vs New IO

Java New input/output (NIO) was introduced with JDK 1.4. Picking up where Standard IO leaves, NIO provides high-speed, block-oriented IO to Java library. By defining classes to hold data, and by processing that data in blocks, NIO takes advantage of low-level optimizations in a way that the java.io package could …

Java NIO Path (with Examples)

The Path class, introduced in the Java SE 7 release, is one of the primary entry points of the java.nio.file package. If our application uses Java New IO, we should learn more about the powerful features available in this class. In this Java tutorial, we are learning 6 ways to …

About Us

HowToDoInJava provides tutorials and how-to guides on Java and related technologies.

It also shares the best practices, algorithms & solutions and frequently asked interview questions.