Home > Store

Java? Class Libraries, Volume 1, The: Supplement for the Java? 2 Platform, Standard Edition, v1.2

Register your product to gain access to bonus material or receive a coupon.

Java? Class Libraries, Volume 1, The: Supplement for the Java? 2 Platform, Standard Edition, v1.2

Book

  • Sorry, this book is no longer in print.
Not for Sale

Description

  • Copyright 1999
  • Dimensions: 7-3/8" x 9-1/4"
  • Edition: 1st
  • Book
  • ISBN-10: 0-201-48552-4
  • ISBN-13: 978-0-201-48552-3

Continuing the successful format of The Java Class Libraries, the supplement contains descriptions of the new pacakges and classes introduced in the Javao 2 Platform, Standard Edition, version 1.2. It also provides details on how the classes and methods have changed from JDKo 1.1. Together, this supplement and The Java Class Libraries, Second Edition, Volume 1, provide a complete reference to the following packages: java.io, java.lang, java.lang.ref, java.lang.reflect, java.math, java.net, java.text, java.util, java.util.jar, and java.util.zip.

The extensive class and member descriptions contain details crucial for developing robust and professional applets and applications. Each description is supplemented by an example that demonstrates the class or member in a relevant context. Numerous examples facilitate learning-by-example and provide useful code for your projects. The information is presented in an easy-to-use, dictionary-like format. Each class description includes:

  • a class hierarchy diagram showing its connection to related classes
  • a detailed overview describing its purpose and key concepts
  • a convenient member summary that briefly describes each member and arranges the members into related groups
  • an example demonstrating the class in a "real-world" context
  • comprehensive descriptions and an example for each member



0201485524B04062001

Sample Content

Table of Contents

PACKAGE OVERVIEWS.

java.io.
java.lang.
java.lang.ref.
java.lang.reflect.
java.math.
java.net.
java.text.
java.util.
java.util.jar.
java.util.zip.

ALPHABETICAL REFERENCE OF CLASSES.

AbstractCollection.
AbstractList.
AbstractMap.
AbstractSequentialList.
AbstractSet.
AccessibleObject.
Adler32.
Annotation.
Array.
ArrayList.
Arrays.
AttributedCharacterIterator.
AttributedString.
Attributes.
Atrributes.Name.
Authenticator.
BigDecimal.
BigInteger.
BitSet.
BreakIterator.
BufferedInputStream.
Byte.
ByteArrayInputStream.
ByteArrayOutputStream.
Calendar.
Character.
ChoiceFormat.
Class.
ClassLoader.
ClassNotFoundException.
Cloneable.
Collection.
Collections.
Comparable.
Comparator.
ConcurrentModificationException.
DatagramPacket.
DatagramSocket.
DatagramSocketImpl.
Date.
DecimalFormatSymbols.
Double.
ExceptionInInitializerError.
FieldPosition.
File.
FileFilter.
FilePermission.
Float.
GregorianCalendar.
HashMap.
HashSet.
Hashtable.
HttpURLConnection.
InflaterInputStream.
InheritableThreadLocal.
Integer.
InvocationTargetException.
Iterator.
JarEntry.
JarFile.
JarInputStream.
JarOutputStream.
JarURLConnection.
LinkedList.
List.
ListIterator.
Locale.
Long.
Manifest.
Map.
Math.
Modifier.
MulticastSocket.
NetPermission.
ObjectInputStream.
ObjectInputStream.getField.
ObjectOutputStream.
ObjectOutputStream.putField.
ObjectStreamClass.
ObjectStreamConstants.
ObjectStreamField.
Package.
ParsePosition.
PasswordAuthentication.
PhantomRef.
PipedReader.
PipedWriter.
PrintStream.
PrintWriter.
Properties.
PropertyPermission.
PushbackInputStream.
PushbackReader.
Random.
RandomAccessFile.
Reference.
ReferenceQueue.
ResourceBundle.
RuleBasedCollator.
RuntimePermission.
SecurityManager.
Serializable.
SerializablePermission.
Set.
Short.
SimpleDateFormat.
SimpleTimeZone.
Socket.
SocketOptions.
SocketPermission.
SoftReference.
SortedMap.
SortedSet.
String.
StringBuffer.
StringCharacterIterator.
System.
Thread.
ThreadLocal.
ThreadGroup.
TimeZone.
TreeMap.
TreeSet.
UnsupportedOperationException.
URL.
URLClassLoader.
URLConnection.
URLDecoder.
Vector.
WeakHashMap.
WeakReference.
ZipEntry.
ZipFile.
ZipInputStream. 0201485524T04062001

Preface

How to Use This Book

This book is a companion to The Java Class Libraries, Second Edition, Volume 1. It contains descriptions of the new packages and classes in the Java™ 2 Platform, Standard Edition, Version 1.2. It also provides details of how the classes and methods have changed from the Java™ Developement Kit (JDK™) Version 1.1 to Version 1.2. It is important to understand that some of the material in this book is not complete and refers to material in The Java Class Libraries, Second Edition, Volume 1.

Like The Java Class Libraries, Second Edition, Volume 1. this book is intended as a reference rather than a tutorial. Its format is similar to a dictionary’s in that it is designed to optimize the time it takes for you to look up information about a class or class member. For a tutorial-style presentation of the class libraries, see The Java™ Tutorial by Mary Campione and Kathy Walrath. The Java™ Class Libraries does not explain any part of the Java language. There are several books you can use to learn the language. These include The Java™ Programming Language, by Ken Arnold and James Gosling, and The Java™ Language Specification, by James Gosling, Bill Joy, and Guy Steele.

Following is an overview of this book.

Package Overviews

This part briefly describes each package and all of the classes in it. Also included are diagrams that show the inheritance hierarchy of the classes that appear in a package.

Each overview contains not only a general description about the package, but also descriptions of the changes in the package for Version 1.2. Each class that has been introduced in Version 1.2 is labeled with a tag. Each class that has been changed for Version 1.2 is labeled with a tag.

Alphabetical Reference of Classes

This part covers the alphabetical listing of the classes from the following packages:

java.io java.net
java.lang java.text
java.lang.ref java.util
java.lang.reflect java.util.jar
java.math java.util.zip

Only those classes that have been changed or added in Version 1.2 are included. Moreover, within the changed classes, only those members that have been changed or added are included. See the Table of Contents for a list of the classes and members in this book. For information about the classes that are changed, see The Java Class Libraries, Second Edition, Volume 1.

Like The Java Class Libraries, Second Edition, Volume 1, the classes are ordered alphabetically without regard to package name or version.

Each class is described in its own chapter. Each chapter contains a picture of the class hierarchy, a class description, a “Changes for Version 1.2” section for classes that have changed, a class example, a member summary, and descriptions for each member that is changed or new in Version 1.2. Chapters for classes that have changed (as opposed to those that were introduced in Version 1.2) have the label CHANGES FOR VERSION 1.2 in their footer.

Class Hierarchy Diagram

Each chapter starts with a class diagram. The class diagram shows all of the ancestors of the class, its siblings, its immediate descendents, and any interfaces that the class implements. In these diagrams, if a package name precedes a class or interface name, the class or interface is not in the same package as the current class.

In the diagrams, the different kinds of Java entities are distinguished visually as follows:

  • The interface: A rounded rectangle
  • The class: A rectangle
  • The abstract class: A rectangle with an empty dot
  • The final class: A rectangle with a black dot
  • Classes with subclasses: A rectangle with a small black triangle in the lower-right corner

Most of these elements are shown in Figure i. The class or interface being described in the current chapter is shaded grey. A solid line represents extends, while a dotted line represents implements.

Class Description

In the class description, we describe all of the properties of the class. For example, the properties of the Graphics class include the current color, font, paint mode, origin, and clipping area. Describing in one place all of a class's available properties and how the properties behave makes learning all of the capabilities of a class much easier than if the property descriptions were scattered throughout the member descriptions.

Any terminology used in the member descriptions is introduced and described in the class descriptions. If you find that the member description lacks detail, go to the class description for more information.

If the class is newly introduced in Version 1.2, its class description is complete. If the class is one that is changed in Version 1.2, the class description is only a summary of the class; the complete class description is in The Java Class Libraries, Second Edition, Volume 1.

Changes for Version 1.2

If the class is one that is changed in Version 1.2, the chapter contains a “Changes for Version 1.2” section that describes the changes, including the new methods that have been added and how existing methods have changed.

Class Example

Most of the chapters for new classes have a class example that illustrates how to use the class. Some of the chapters for the changed classes have a class example. For some of the changed classes, the changes are so minor that the class example in The Java Class Libraries, Second Edition, Volume 1 is still relevant.

Member Summary

The member summary is intended to help the reader quickly grasp the key points of the class. It groups the members of the class into categories that are specific to that class. For example, in the List class the Selection Methods category lists all methods having to do with selections. It is meant to be a quick summary of the class’s members, so it does not contain any syntax information other than the name of the member.

The member summary for both changed and new classes is complete. In a changed class, changed members are labeled with a tag, while new members are labeled with a tag. Only those members with one of these two tags are documented in the chapter. The documentation for unlabeled members in is The Java Class Libraries, Second Edition, Volume 1.

For example, following is the member summary for ZipInputStream.

In Version 1.2, ZipInputStream has one new member, createZipEntry(), and one changed member, available(). The chapter for ZipInputStream contains member descriptions for createZipEntry() and available(). All other members of ZipInputStream are described in The Java Class Libraries, Second Edition, Volume 1.

Member Descriptions

The member descriptions appear in alphabetical order within a class chapter regardless of what kind of method or field they are. This is done to make locating a member proceed as fast as possible.

Overloaded methods are placed together in one member description because they share very similar functionality. The different overloaded forms are typically provided as a convenience for the programmer when specifying parameters. For instance, some overloads eliminate parameters by providing common defaults. To describe overloads with missing parameters, we use a phrase of the form “if the parameter p is not specified, it defaults to the value 3.14.” Other overloads take different representations of a value. For example, one overload could take a particular parameter as an integer, while another could take the same parameter as a string containing an integer.

In a changed class, each member heading is labeled with either a or a tag. indicates a member whose behavior has changed in Version 1.2. The changes might include an addition of an overloaded form, deprecation, or any other change in the semantics of the member. indicates that the member was introduced in Version 1.2. Following are examples of each tag.

Each member description contains some or all of the following fields:

PURPOSE A brief description of the purpose of this member
SYNTAX The syntactic declaration of this member
DESCRIPTION A full description of this member
PARAMETERS The parameters accepted by this member, if any, listed in alphabetical order
RETURNS The value and its range returned by this member, if any
EXCEPTIONS The exceptions and errors thrown by this member, if any, listed in alphabetical order
SEE ALSO Other related classes or members, if any, listed in alphabetical order
OVERRIDES The method that this member overrides, if any
EXAMPLE A code example that illustrates how this member is used. This is sometimes a reference to an example that illustrates the use of this method in another member example or class example.

If an overloaded form has been added to an existing member, the overloaded form has a SINCE 1.2 tag. For example, in Version 1.1 the String class has a form of compareTo() that accepts a String parameter. In Version 1.2, the String class has two overloaded forms of compareTo(), one that accepts an Object and one that accepts a String. String.compareTo()’s syntax field looks as follows.

public int compareTo(String str)
SYNTAX public int compareTo(String str)
    SINCE 1.2 public int compareTo(Object str)

A changed member, in addition to having its member heading labeled with a tag, always includes the following field.

1.2 CHANGES    Description of the old behavior or what has changed in Version 1.2

Deprecation

A method or class is deprecated if its use is no longer recommended. A deprecated method appears in the Member Summary under the Deprecated Methods section. In the chapter body, the deprecated method is annotated by a “deprecated” tag in its method heading. For example, Component.size() is a deprecated method. It has the following method heading.

size() DEPRECATED

If not all of the overloaded forms of the method are deprecated, a DEPRECATED tag appears beside the syntax of each deprecated form. For example, the second of the two forms of BorderLayout.addLayoutComponent() is deprecated. This is indicated by the DEPRECATED tag, as follows.

SYNTAX public void addLayoutComponent(Component comp, Object location)
    DEPRECATED public void addLayoutComponent(String location, Component comp)

The method description contains a deprecation section with instructions on how to replace the usage of the deprecated method, like this:

DEPRECATION     A description of how to replace the usage of this deprecated method

Where to Download the Examples

All of the code examples in this book have been compiled and run on the FCS version of the Java™ 2SDK, Standard Edition, Version 1.2 (formerly "JDK™ 1.2") either on Solaris or Windows NT or both. Most of the complete examples are available on-line. You can access them and other information about this book at http://java.sun.com/books/Series.

Typographical Conventions Used in This Book

Lucida Sans Typewriter is used for examples, syntax declarations, class names, method names, values, and field names. Italic is used when defining a new term and for emphasis.



0201485524P04062001

Updates

Submit Errata

More Information

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020