The exact quotation from the book appears to be
The Java "new" I/O library, introduced in JDK 1.4 in the java.nio.*
packages, has one goal: speed. In fact, the "old" I/O packages have
been reimplemented using nio in order to take advantage of this
speed increase, so you will benefit even if you don’t explicitly write
code with nio.
(Thinking in Java, 4th edition, p. 679)
That is a bit clearer than your paraphrase. Also, the beginning of the chapter in which that appears ("I/O") defines the terms "I/O" and "nio" explicitly.
What exactly does NIO and IO refer to here?
"I/O" is common computer jargon for "input / output", and Eckles uses it in that sense. "nio" refers specifically to the java.nio.*
classes of the Java standard library, which were new to Java 1.4. Like many others, Eckles associates the 'n' with "new", though Oracle (then Sun) seems to have had the more technical term "non-blocking" in mind. Where Eckles talks about "the 'old' I/O packages" he means primarily the java.io.*
classes (only one package, actually), which he had just spent 30 pages discussing.
Why is it faster than IO?
According to Eckles:
The speed comes from using structures that are closer to the operating system’s way of performing I/O: channels and buffers.
If that doesn't make sense to you then you probably need to study the low-level details to which he is referring. You can get a sense of them, however, from the details of the nio classes, to which Eckles devotes the next 18 pages of the book.
Is this true [that java.io.*
classes benefited from nio]?
The assertion seems wholly plausible to me. I don't have easy access to the Java 1.4 sources, but it took me about one minute to Google the java.io.FileInputStream
source, and discover that in the first version I looked at (from OpenJDK 7), although the key bits are native, the class is indeed implemented in terms of the nio class java.nio.channels.FileChannel
.