Sun Microsystems has long used the slogan "The Network Is The Computer." It's no surprise, therefore, that they designed Java to be a network-centric language. The java.net package provides powerful and easy-to-use networking capabilities. The examples in this chapter demonstrate those capabilities at a number of different levels of abstraction. They show you how to:
Java 1.4 introduced the New I/O API of java.nio and its subpackages. This new API is channel-based instead of stream-based, and can be used for local file I/O as well as network I/O. java.nio is particularly suited to high-performance servers, and does not make the java.net package obsolete. The New I/O API is covered in Chapter 6. |