// Getting file channels try(FileChannel in = FileChannel.open(source, StandardOpenOption.READ); FileChannel out = FileChannel.open(target, StandardOpenOption.WRITE)) { // JavaVM does its best to do this as native I/O operations. in.transferTo(0, in.size(), out); } Selectors A selector ( and subclasses) provides a mechanism for waiting on channels and recognizing when one or more become available for data transfer. When a number of channels are registered with the selector, it enables blocking of the program flow until at least one channel is ready for use, or until an interruption condition occurs. Although this multiplexing behavior could be implemented with threads, the selector can provide a significantly more efficient implementation using lower-level operating system constructs. A POSIX-compliant operating system, for example, would have direct representations of these concepts, select(). A notable application of this design would be the common paradigm in server software which involves simultaneously waiting for responses on a number of sessions. Character sets In Java, a character set is a mapping between Unicode characters (or a subset of them) and bytes. The package of NIO provides facilities for identifying character sets and providing encoding and decoding algorithms for new mappings. Reception It is unexpected that a Channel associated with a Java IO RandomAccess file closes the file descriptor on an interrupt, whereas RandomAccessFiles own read method does not do this. JDK 7 and NIO.2 JDK 7 includes a package which, with the class (also new to JDK 7), among other features, provides extended capabilities for filesystem tasks, e.g. can work with symbolic/hard links and dump big directory listings into buffers more quickly than the old File class does. The package and its related package, , provide comprehensive support for file I/O and for accessing the file system. A zip file system provider is also available in JDK 7. References External links JDK 5.0 New I/O-related APIs & Developer Guides - description of New I/O by Oracle Corporation Learn Java SE 7 | NIO 2 Features JSR 51 (NIO) JSR 203 (NIO.2) Architecture of a Highly Scalable NIO-Based Server - discussion on Java NIO and patterns of usage Java NIO tutorial The Rox Java NIO Tutorial Scalable IO in Java (PDF) Java (programming language) Java specification requests