Chapter    1

I/O Basics and APIs

Input and output (I/O) facilities are fundamental parts of operating systems along with computer languages and their libraries. All but trivial computer programs perform some kind of input and/or output operations.

Java has always supported I/O. Its initial suite of I/O APIs and related architecture are known as classic I/O. Because modern operating systems feature newer I/O paradigms, which classic I/O doesn’t support, new I/O (NIO) was introduced as part of JDK 1.4 to support them. Lack of time prevented some planned NIO features from being included in this release, which led to these other NIO features being deferred to JDK 5 and JDK 7.

This chapter introduces you to classic I/O, NIO, and more NIO (NIO.2). ...

Get Java I/O, NIO and NIO.2 now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.