TOC
BACK
FORWARD
HOME

Java 1.1 Unleashed

- Appendix C -
Java Class Library

by Laura Lemay revised by Billy Barron and Jeff Shockley

This appendix provides a general overview of the classes available in the standard Java packages (that is, the classes that are guaranteed to be available in any Java implementation). This appendix is intended for general reference; for more specific information about each variable (its inheritance, variables, and methods), as well as the various exceptions for each package, see the API documentation from Sun at http://java.sun.com. A copy of the 1.1 API documentation is on the CD-ROM included with this book.

java.lang

The java.lang package contains the classes and interfaces that are the core of the Java language.

Interfaces

Cloneable Interface indicating that an object may be copied or cloned
Runnable Methods for classes that want to run as threads
Serializable Interface for tagging an object that can be serialized (Java 1.1)

Classes

Boolean Object wrapper for boolean values
Byte Object wrapper for byte values (Java 1.1)
Character Object wrapper for char values
Class Runtime representations of classes
ClassLoader Abstract behavior for handling loading of classes
Compiler System class that gives access to the Java compiler
Double Object wrapper for double values
Float Object wrapper for float values
Integer Object wrapper for int values
Long Object wrapper for long values
Math Utility class for math operations
Number Abstract superclass of all number classes (Integer, Float, and so on)
Object Generic Object class, at top of inheritance hierarchy
Process Abstract behavior for processes such as those spawned using methods in the System class
Runtime Access to the Java runtime system
SecurityManager Abstract behavior for implementing security policies
Short Object wrapper for short values (Java 1.1)
String Character strings
StringBuffer Mutable strings
System Access to Java's system-level behavior, provided in a platform-independent way.
Thread Methods for managing threads and classes that run in threads
ThreadDeath Class of object thrown when a thread is asynchronously terminated
ThreadGroup A group of threads
Throwable Generic exception class; all objects thrown must beaThrowable
Void Object wrapper for void types (Java 1.1)

java.lang.reflect (Java 1.1)

The java.lang.reflect package is used to find out information about loaded classes such as what methods and fields they have.

Interfaces

Member Methods to find out information about a member

Classes

Array Methods to dynamically create and access arrays
Constructor Methods to find out about and access constructors
Field Methods to find out about and access variables
Method Methods to find out about and access methods
Modifier Decoder for static class and member access modifiers

java.math (Java 1.1)

The java.math package contains two classes that can hold numbers of arbitrary size.

Classes

BigDecimal A very big floating-point number
BigInteger A very big integer number

java.util

The java.util package contains various utility classes and interfaces, including random numbers, system properties, and other useful classes.

Interfaces

Enumeration Methods for enumerating sets of values
EventListener Methods for listening to events (Java 1.1)
Observer Methods for enabling classes to be Observable objects

Classes

BitSet A set of bits
Calendar A generic calendar (Java 1.1)
Date The current system date as well as methods for generating and parsing dates
Dictionary An abstract class that maps between keys and values (superclass of HashTable)
EventObject A event object associated with another object (Java 1.1)
GregorianCalendar A Gregorian calendar, which is the type you probably use (Java 1.1)
Hashtable A hash table
ListResourceBundle A resource supplier for a Locale (Java 1.1)
Locale A description of a geographic location (Java 1.1)
Observable An abstract class for observable objects
Properties A hash table that contains behavior for setting and retrieving persistent properties of the system or a class
PropertyResourceBundle A resource supplier which uses properties from a file (Java 1.1)
Random Utilities for generating random numbers
ResourceBundle A set of objects related to a Locale (Java 1.1)
SimpleTimeZone A simplified time zone (Java 1.1)
Stack A stack (a last-in-first-out queue)
StringTokenizer Utilities for splitting strings into individual "tokens"
TimeZone A generic time zone (Java 1.1)
Vector A growable array of Objects

java.util.zip (Java 1.1)

The java.util.zip package provides classes for dealing with ZIP and GZIP files.

Interfaces

Checksum Methods for calculating a checksum

Classes

Adler32 Calculates an Adler 32 checksum
CRC32 Calculates a CRC 32 checksum
CheckedInputStream Input stream with an associated checksum
CheckedOutputStream Output stream with an associated checksum
Deflator Compressor for uncompressed files
DeflatorOutputStream Output stream that compresses files
GZIPInputSteam Input stream from a GZIP file
GZIPOutputStream Output stream to a GZIP file
Inflater Decompressor for compressed files
InflaterInputStream Input stream that decompresses files
ZipEntry A file entry inside a ZIP file
ZipFile A whole ZIP file
ZipInputStream Input stream from a ZIP file
ZipOutputStream Output stream to a ZIP file

java.io

The java.io package provides input and output classes and interfaces for streams and files.

Interfaces

DataInput Methods for reading machine-independent typed input streams
DataOutput Methods for writing machine-independent typed output streams
Externalizable Methods to write/read an object's contents with a stream (Java 1.1)
FilenameFilter Methods for filtering filenames
ObjectInput Methods for reading objects (Java 1.1)
ObjectInputValidation Methods to validate an object (Java 1.1)
ObjectOutput Methods for writing objects (Java 1.1)
Serializable Tag to say that this class can be serialized (Java 1.1)

Classes

BufferedInputStream A buffered input stream
BufferedOutputStream A buffered output stream
BufferedReader A buffered reader (Java 1.1)
BufferedWriter A buffered writer (Java 1.1)
ByteArrayInputStream An input stream from a byte array
ByteArrayOutputStream An output stream to a byte array
CharArrayReader A reader from an array of characters (Java 1.1)
CharArrayWriter A writer to an array of characters (Java 1.1)
DataInputStream Enables you to read primitive Java types (ints, chars, booleans, and so on) from a stream in a machine-independent way
DataOutputStream Enables you to write primitive Java data types (ints, chars, booleans, and so on) to a stream in a machine-independent way
File Represents a file on the host's file system
FileDescriptor Holds onto the UNIX-like file descriptor of a file or socket
FileInputStream An input stream from a file, constructed using a filename or descriptor
FileOutputStream An output stream to a file, constructed using a filename or descriptor
FileReader A reader from a file, constructed using a filename or descriptor (Java 1.1)
FileWriter A writer to a file, constructed using a filename or descriptor (Java 1.1)
FilterInputStream Abstract class that provides a filter for input streams (and for adding stream functionality such as buffering)
FilterOutputStream Abstract class that provides a filter for output streams (and for adding stream functionality such as buffering)
FilterReader A class that provides a filter for readers (and for adding functionality such as buffering) (Java 1.1)
FilterWriter A class that provides a filter for writers (and for adding functionality such as buffering) (Java 1.1)
InputStream An abstract class representing an input stream of bytes; the parent of all input streams in this package
LineNumberInputStream An input stream that keeps track of line numbers
ObjectInputStream A class that deserializes data and objects (Java 1.1)
ObjectOutputStream A class that serializes data and objects (Java 1.1)
ObjectStreamClass A descriptor for classes that can be serialized (Java 1.1)
OutputStream An abstract class representing an output stream of bytes; the parent of all output streams in this package
OutputStreamWriter A bridge between byte and character streams (Java 1.1)
PipedInputStream A piped input stream, which should be connected to a PipedOutputStream to be useful
PipedOutputStream A piped output stream, which should be connected to a PipedInputStream to be useful (together they provide safe communication between threads)
PipedReader A piped reader, which should be connected to a PipedWriter to be useful (Java 1.1)
PipedWriter A piped writer, which should be connected to a PipedReader to be useful (Java 1.1)
PrintStream An output stream for printing (used by System.out. println(...))
PrintWriter A writer for printing (Java 1.1)
PushbackInputStream An input stream with a pushback buffer
PushbackReader A reader with a pushback buffer (Java 1.1)
RandomAccessFile Provides random access to a file, constructed from filenames, descriptors, or objects
Reader An abstract class representing an input character stream; the parent of all readers in this
SequenceInputStream Converts a sequence of input streams into a single input package (Java 1.1) stream
StreamTokenizer Converts an input stream into a series of individual tokens
StringBufferInputStream An input stream from a String object
StringReader A reader from a String object (Java 1.1)
StringWriter A writer to a String object (Java 1.1)
Writer An abstract class representing an output character stream; the parent of all writers in this package (Java 1.1)

java.net

The java.net package contains classes and interfaces for performing network operations, such as sockets and URLs.

Interfaces

ContentHandlerFactory Methods for creating ContentHandler objects
FileNameMap Methods for mapping between types (Java 1.1)filenames and MIME
SocketImplFactory Methods for creating socket implementations (instance of the SocketImpl class)
URLStreamHandlerFactory Methods for creating URLStreamHandler objects

Classes

ContentHandler Abstract behavior for reading data from a URL connection and constructing the appropriate local object, based on MIME types
DatagramPacket A datagram packet (UDP)
DatagramSocket A datagram socket
DatagramSocketImpl Abstract base class for datagram and multicast sockets (Java 1.1)
HttpURLConnection A connection can handle the HTTP protocol (Java 1.1)
InetAddress An object representation of an Internet host (host name, IP address)
MulticastSocket A server-side socket with support for transmitting data to multiple client sockets (Java 1.1)
ServerSocket A server-side socket
Socket A socket
SocketImpl An abstract class for specific socket implementations
URL An object representation of a URL
URLConnection Abstract behavior for a socket that can handle various Web-based protocols (http, ftp, and so on)
URLEncoder Turns strings into x-www-form-urlencoded format
URLStreamHandler Abstract class for managing streams to objects referenced by URLs

java.awt

The java.awt package contains the classes and interfaces that make up the Abstract Windowing Toolkit.

Interfaces

Adjustable Methods for objects with adjustable numeric values (Java 1.1)
EventSource Methods for objects that generate events (Java 1.1)
ItemSelectable Methods for objects that contain a set of selectable items (Java 1.1)
LayoutManager Methods for laying out containers
LayoutManager2 Methods for laying out containers based on a constraints object (Java 1.1)
MenuContainer Methods for menu-related containers
PrintGraphics Methods for providing a print graphics context (Java 1.1)
Shape Methods for geometric shapes (Java 1.1)

Classes

AWTEvent The parent of all AWT events (Java 1.1)
AWTEventMulticaster A multicast event dispatcher (Java 1.1)
BorderLayout A layout manager for arranging items in border formation
Button A UI pushbutton
Canvas A canvas for drawing and performing other graphics operations
CardLayout A layout manager for HyperCard-like metaphors
Checkbox A checkbox
CheckboxGroup A group of exclusive checkboxes (radio buttons)
CheckboxMenuItem A toggle menu item
Choice A popup menu of choices
Color An abstract representation of a color
Component The abstract generic class for all UI components
Container Abstract behavior for a component components or containers that can hold other
Cursor A screen cursor (Java 1.1)
Dialog A window for brief interactions with users
Dimension An object representing width and height
Event An object representing events caused by the system or based on user input
EventQueue A queue of events waiting to be processed (Java 1.1)
FileDialog A dialog box for getting filenames from the local file system
FlowLayout A layout manager that lays out objects from left to right in rows
Font An abstract representation of a font
FontMetrics Abstract class for holding information about a specific font's character hapes and height and width information
Frame A top-level window with a title
Graphics Abstract behavior for representing a graphics context and for drawing and painting shapes and objects
GridBagConstraints Constraints for components laid out using GridBagLayout
GridBagLayout A layout manager that aligns components horizontally and vertically based on their values from GridBagConstraints
GridLayout A layout manager with rows and columns; elements are added to each cell in the grid
Image An abstract representation of a bitmap image
Insets Distances from the outer border of the window; used to lay out components
Label A text label for UI components
List A scrolling list
MediaTracker A way to keep track of the status of media objects being loaded over the Net
Menu A menu that can contain menu items and is a container on a menu bar
MenuBar A menu bar (container for menus)
MenuComponent The abstract superclass of all menu elements
MenuItem An individual menu item
MenuShortcut A keyboard shortcut for a menu item (Java 1.1)
Panel A container that is displayed
Point An object representing a point (x and y coordinates)
Polygon An object representing a set of points
PopupMenu A menu that pops up (Java 1.1)
PrintJob A job to be printed (Java 1.1)
Rectangle An object representing a rectangle (x and y coordinates for the top-left corner, plus width and height)
ScrollPane A container with automatic scrolling (Java 1.1)
Scrollbar A UI scrollbar object
SystemColor A class containing the GUI colors for a system (Java 1.1)
TextArea A multiline, scrollable, editable text field
TextComponent The superclass of all editable text components
TextField A fixed-size editable text field
Toolkit Abstract behavior for binding the abstract AWT classes to a platform specific toolkit implementation
Window A top level window, and the superclass of the Frame and Dialog classes

java.awt.datatransfer (Java 1.1)

The java.awt.datatransfer package is a subpackage of the AWT that provides interfaces and methods for talking to the clipboard.

Interfaces

ClipboardOwner Methods for classes providing data to a clipboard
Transferable Methods for classes providing data to a transfer operation

Classes

Clipboard The clipboard itself
DataFlavor The opaque concept of a data format
StringSelection A transfer agent for a string

java.awt.event (Java 1.1)

The java.awt.event package is a subpackage of the AWT that implements the new event model for Java 1.1.

Interfaces

ActionListener Methods for listening to an action event
AdjustmentListener Methods for listening to an adjustment event
ComponentListener Methods for listening to a component event
FocusListener Methods for listening to a focus event
ItemListener Methods for listening to an item event
KeyListener Methods for listening to a keyboard event
MouseListener Methods for listening to a mouse event
MouseMotionListener Methods for listening to a mouse motion event
TextListener Methods for listening to a text event
WindowListener Methods for listening to a window event

Classes

ActionEvent An action event
AdjustmentEvent An adjustment event generated from an adjustable object
ComponentAdapter An adapter that listens to component events
ComponentEvent A component event
ContainerAdapter An adapter that listens to container events
ContainerEvent A container event
FocusAdapter An adapter that listens to focus events
FocusEvent A focus event
InputEvent An input event
ItemEvent An item event generated from an ItemSelectable object
KeyAdapter An adapter that listens to keyboard events
KeyEvent A keyboard event
MouseAdapter An adapter that listens to mouse events
MouseEvent A mouse event
MouseMotionAdapter An adapter that listens to mouse motion events, such as drag
PaintEvent A component-level paint event
TextEvent A text event generated by a TextComponent
WindowAdapter An adapter that listens to window events
WindowEvent A windowing event

xjava.awt.image

The java.awt.image package is a subpackage of the AWT that provides interfaces and classes for managing bitmap images.

Interfaces

ImageConsumer Methods for receiving image data created by an ImageProducer
ImageObserver Methods to track the loading and construction of an image
ImageProducer Methods for producing image data received by an ImageConsumer

Classes

AverageScaleFilter A filter that scales an image based on an average algorithm (Java 1.1)
ColorModel An abstract class for managing color information for images
CropImageFilter A filter for cropping images to a particular size
DirectColorModel A specific color model for managing and translating pixel color values
FilteredImageSource An ImageProducer that takes an image and an ImageFilter object and produces an image for an ImageConsumer
ImageFilter A filter that takes image data from an ImageProducer, modifies it in some way, and hands it off to an ImageConsumer
IndexColorModel A specific color model for managing and translating color values in a fixed-color map
MemoryImageSource An image producer that gets its image from memory; used after constructing an image by hand
PixelGrabber An ImageConsumer that retrieves a subset of the pixels in an image
ReplicateScaleFilter A filter that scales an image (Java 1.1)
RGBImageFilter Abstract behavior for a filter that modifies the RGB values of pixels in RGB images

java.awt.peer

The java.awt.peer package is a subpackage of AWT that provides the (hidden) platform- specific AWT classes (for example, Motif, Macintosh, and Windows 95) with platform- independent interfaces to implement. Thus, callers using these interfaces need not know which platform's window system these hidden AWT classes are currently implementing.

Each class in the AWT that inherits from either Component or MenuComponent has a corresponding peer class. Each of those classes is the name of the Component with -Peer added (for example, ButtonPeer, DialogPeer, and WindowPeer). Because each one provides similar behavior, they are not enumerated here.

java.applet

The java.applet package provides applet-specific behavior.

Interfaces

AppletContext Methods to refer to the applet's context
AppletStub Methods for implementing applet viewers
AudioClip Methods for playing audio files

Classes

Applet The base applet class

java.beans

The java.beans package contains the classes and interfaces that make the JavaBeans technology possible.

Interfaces

BeanInfo Methods that can be used to find out information explicitly provided by a bean
Customizer Methods that define the overhead to provide a complete visual editor for a bean
PropertyChangeListener Method that is called when a bound property is changed
PropertyEditor Methods that provide support for GUIs that allow users to edit a property value of a given type
VetoableChangeListener Methods that are called when a constrained property is changed
Visibility Methods used to determine whether interface is available for the bean to use a bean requires a graphical user interface and whether a graphical user

Classes

BeanDescriptor Provides global information about a bean
Beans Provides some general-purpose beans control methods
EventSetDescriptor Represents a set of events that a bean is capable of generating
FeatureDescriptor Serves as a common base class for the EventSetDescriptor, MethodDescriptor, and PropertyDescriptor classes
IndexedPropertyDescriptor Provides methods for accessing the type of an indexed property along with its accessor methods
Introspector Provides the overhead necessary to analyze a bean and determine its public properties, methods, and events
MethodDescriptor Provides methods for accessing information such as a method's parameters
ParameterDescriptor Allows bean implementors to provide additional information for each of their parameters
PropertyChangeEvent Stores information relating to a change in a bound or constrained property
PropertyChangeSupport A helper class for managing listeners of bound and constrained properties
PropertyDescriptor Provides methods for accessing the type of a property along with its accessor methods and describes whether it is bound or constrained
PropertyEditorManager Provides a way of registering property types so that their editors can be easily found
PropertyEditorSupport A helper class implementing the PropertyEditor interfaces that is used to make the construction of custom property editors a little easier
SimpleBeanInfo A support class designed to make it easier for bean developers to provide explicit information about a bean
VetoableChangeSupport A helper class for managing listeners of bound and constrained properties

java.rmi

The java.rmi package contains the classes and interfaces that enable the programmer to create distributed Java-to-Java applications, in which the methods of remote Java objects can be invoked from other Java virtual machines, possibly on different hosts.

Interfaces

Remote Methods for identifying all remote objects

Classes

Naming Methods for obtaining references to remote objects based on Uniform Resource Locator (URL) syntax
RMISecurityManager Methods defining the RMI stub security policy for applications (not applets)

java.rmi.dgc

Interfaces

DGC Methods for cleaning connections for unused clients

Classes

Lease Contains a unique VM identifier and a lease duration
VMID Methods for maintaining unique VMID across all Java virtual machines

java.rmi.registry

Interfaces

Registry A class used to obtain the registry for different hosts
RegistryManager Methods used to interface to the private implementation

Classes

LocateRegistry Used to obtain the bootstrap for the registry on a particular host

java.rmi.server

Interfaces

LoaderHandler
RMIFailureHandler Methods for handling when the RMI runtime system is unable to create a Socket or ServerSocket
RemoteCall Methods for implementing calls to a remote object
RemoteRef Represents a handle for a remote object
ServerRef Represents the server-side handle for a remote object implementation
Skeleton Represents the server-side entity that dispatches calls to the actual remote object implementation
Unreferenced Methods to receive notification when there are no more remote references to it

Classes

LogStream Provides a mechanism for logging interest to those monitoring the system errors that are of possible
ObjID Used to identify remote objects uniquely in a VM
Operation Holds a description of a Java method
RMIClassLoader Provides static methods for loading classes over the net-work
RMISocketFactory Used by the RMI runtime system to obtain client and server sockets for RMI calls
RemoteObject Provides the remote semantics of Object by implementing methods for hashCode, equals, and toString
RemoteServer A superclass to all server implementations that provides the framework to support a wide range of remote reference semantics
RemoteStub Stub objects are surrogates that support exactly the same set of remote interfaces defined by the actual implementation of the remote object
UID Abstraction for creating identifiers that are unique with respect to the the host on which it is generated
UnicastRemoteObject Defines a nonreplicated remote object whose references are valid only while the server process is alive

java.security

The java.security package contains the classes and interfaces that enable the programmer to implement certificates and digital signatures in Java components.

Interfaces

Certificate Methods for managing a certificate, including encoding and decoding
KeyParams An interface to alogrithm-specific key parameter interfaces such as DSAParams
Principal Represents the principal component of a certificate

Classes

DigestInputStream Represents an input stream that has a message digest associated with it
DigestOutputStream Represents an output stream that has a message digest associated with it
Identity Methods for managing identities, which can be objects such as people, companies, or organizations that can be authenticated using a public key
IdentityScope Methods for defining the scope of an identity including the name of the identity, its key, and associated certificates
Key An abstract class representing a cryptographic key
KeyPair A simple holder for a key pair (a public key and a private key)
MessageDigest Methods that provide the functionality of a message digest algorithm
PrivateKey A subclass of Key representing a private key
Provider Represents a Security Package Provider (SPP) for the Java Security API
PublicKey A subclass of Key representing a public key
SecureRandom Generates a random number
Security Methods for managing Security Package Providers (SPPs)
Signature Provides the algorithm for digital signatures
Signer Represents an identity that can also sign

java.security.acl

The java.security.acl package provides the interface to a data structure that guards access to resources.

Interfaces

Acl An interface representing an Access Control List (ACL), which is a data structure used to guard access to resources
AclEntry Methods that allow programmers to add, remove, or set permissions for the Principals of each ACLEntry in the ACL
Group Methods that allow programmers to add or remove a member from the group of Principals
Owner Represents the owner of an ACL
Permission Represents the type of access granted to a resource such as a Principal in the ACL

java.security.interfaces

Interfaces

DSAKey Methods used to authenticate components including Java applets and ActiveX controls distributed on the Web
DSAParams Methods allowing programmers to get the base, prime, and subprime
DSAPublicKey An interface to a DSA public key

java.sql

The java.sql package includes classes, interfaces, and methods you can use to connect your Java applications to back-end databases.

Interfaces

CallableStatement Methods used to execute stored procedures and handle multiple result sets
Connection Represents a session with the database
DatabaseMetaData An interface allowing information about the database programmers to get high-level
Driver Methods used to connect to a database
PreparedStatement Methods for running precompiled SQL statements
ResultSet Methods for retrieving values from an executed SQL statement
ResultSetMetaData Methods that provide properties of the columns in a ResultSet information about the types and
Statement Used for static SQL statements

Classes

Date Provides methods for formatting and referencing date values
DriverManager Allows for the managing of a set of JDBC drivers
DriverPropertyInfo Provides methods for obtaining different properties of a driver
Time Provides methods for formatting and referencing time values
Timestamp A wrapper that holds the SQL TIMESTAMP value
Types Defines constants that are used to identify SQL types

java.text

The java.text package includes classes and methods used to format objects such as numbers, dates, times, and so on to a string, or to parse a given string to an object such as number, date, time, and so on.

Interfaces

CharacterIterator Methods to traverse a string and return various information about it

Classes

ChoiceFormat Methods that allow the numbers attaching of formats to
CollatedString Provides a way to use international strings in a hash table or sorted collection
Collation Allows the comparing of Unicode text
CollationElementIterator Provides a way to iterate over an international string
DateFormat An abstract class that includes several date-time formatting subclasses
DateFormatData Methods to set the date-time formatting data
DecimalFormat Methods to format numbers
Format A base class for all formats
FormatStatus Used to align formatted objects
MessageFormat Methods to create concatenated messages
NumberFormat An abstract class for all number formats including subclasses; you can use their methods to format and parse numbers
NumberFormatData Encapsulates localizable number format data
ParseStatus Gets the status of parsing when you parse through a string with different formats
SimpleDateFormat Methods to format a date or time into a string
SortKey Methods to do bitwise comparison of strings
StringCharacterIterator Methods for bidirectional iteration over a string
TableCollation Implements Collation using data-driven tables
TextBoundary Used to locate boundaries in given text

TOCBACKFORWARDHOME


©Copyright, Macmillan Computer Publishing. All rights reserved.