NIO, Regular Expressions,
and Other Packages
hen Java was originally released, it included a set of eight packages, called
the core API. Each subsequent release added to the API. Today, the Java API
contains a large number of packages. Many of the new packages support areas
of specialization that are beyond the scope of this topic. However, five packages
warrant an examination here: java.nio, java.util.regex, java.lang.reflect, java.rmi, and
java.text. They support NIO-based I/O, regular expression processing, reflection, Remote
Method Invocation (RMI), and text formatting, respectively.
The NIO API offers a different way to look at and handle certain types of I/O operations.
The regular expression package lets you perform sophisticated pattern matching operations.
This chapter provides an in-depth discussion of both of these packages along with extensive
examples. Reflection is the ability of software to analyze itself. It is an essential part of the
Java Beans technology that is covered in Chapter 28. Remote Method Invocation (RMI) allows
you to build Java applications that are distributed among several machines. This chapter
provides a simple client/server example that uses RMI. The text formatting capabilities of
java.text have many uses. The one examined here formats date and time strings.
The Core Java API Packages
Table 27-1 lists all of the core API packages defined by Java and summarizes their functions.
Primary Function
Suppor ts construction of applets.
Provides capabilities for graphical user inter faces.
Suppor ts color spaces and profiles.
Transfers data to and from the system clipboard.
Suppor ts drag-and-drop operations.
Handles events.
TABLE 27-1
The Core Java API Packages
Search WWH :
Custom Search
Previous Page
Java SE 6 Topic Index
Next Page
Java SE 6 Bookmarks