Java The Complete Reference, Seventh Edition

(Greg DeLong) #1

554 Part II: The Java Library


The java.util Subpackages


Java defines the following subpackages tojava.util:


  • java.util.concurrent

  • java.util.concurrent.atomic

  • java.util.concurrent.locks

  • java.util.jar

  • java.util.logging

  • java.util.prefs

  • java.util.regex

  • java.util.spi

  • java.util.zip


Each is briefly examined here.

java.util.concurrent, java.util.concurrent.atomic, and java.util.concurrent.locks

Thejava.util.concurrentpackage along with its two subpackages,java.util.concurrent.atomic
andjava.util.concurrent.locks, support concurrent programming. These packages provide
a high-performance alternative to using Java’s built-in synchronization features when
thread-safe operation is required. These packages are examined in detail in Chapter 26.

java.util.jar

Thejava.util.jarpackage provides the ability to read and write Java Archive (JAR) files.

java.util.logging

Thejava.util.loggingpackage provides support for program activity logs, which can be
used to record program actions, and to help find and debug problems.

java.util.prefs

Thejava.util.prefspackage provides support for user preferences. It is typically used to
support program configuration.

java.util.regex

Thejava.util.regexpackage provides support for regular expression handling. It is described
in detail in Chapter 27.

java.util.spi

Thejava.util.spipackage provides support for service providers. (Added by Java SE 6.)

java.util.zip

Thejava.util.zippackage provides the ability to read and write files in the popular ZIP
and GZIP formats. Both ZIP and GZIP input and output streams are available.
Free download pdf