O'Reilly logo

Just Java™ 2 by Peter van der Linden

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

New I/O Package

image

JDK 1.4 introduced a package called java.nio. “Nio” stands for “new I/O” (so the JDK 1.5 I/O improvements must be “even newer than new I/O”). The java.nio package and subpackages support four important features not previously well-provisioned in Java:

  • A non-blocking I/O facility for writing scalable servers

  • A file interface that supports locks and memory mapping

  • A pattern-matching facility based on Perl-style regular expressions

  • Character-set encoders and decoders

Instead of building these on top of streams or file descriptors, these features are implemented using two new concepts: buffers and channels.

The right way ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required