PersonalJava API SpecificationVersion 1.1 July 17, 1998
Copyright © 1998 Sun Microsystems, Inc.
All rights reserved. Copyright in this document is owned by Sun Microsystems, Inc. Sun Microsystems, Inc. (SUN) hereby grants to you at no charge a nonexclusive, nontransferable, worldwide, limited license (without the right to sublicense) under SUN's intellectual property rights that are essential to practice the PersonalJava 1.1 Specification ("Specification") to use the Specification for internal evaluation purposes only. Other than this limited license, you acquire no right, title, or interest in or to the Specification and you shall have no right to use the Specification for productive or commercial use.
RESTRICTED RIGHTS LEGENDUse, duplication, or disclosure by the U.S. Government is subject to restrictions of FAR 52.227-14(g)(2)(6/87) and FAR 52.227-19(6/87), or DFAR 252.227-7015(b)(6/95) and DFAR 227.7202-1(a).
This software and documentation is the confidential and proprietary information of Sun Microsystems, Inc. ("Confidential Information"). You shall not disclose such Confidential Information and shall use it only in accordance with the terms of the license agreement you entered into with Sun. SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. TRADEMARKSSun, the Sun logo, Sun Microsystems, JavaSoft, JavaBeans, JDK, Java, HotJava, HotJava Views, Visual Java, Solaris, NEO, Joe, Netra, NFS, ONC, ONC+, OpenWindows, PC-NFS, EmbeddedJava, PersonalJava, SNM, SunNet Manager, Solaris sunburst design, Solstice, SunCore, SolarNet, SunWeb, Sun Workstation, The Network Is The Computer, ToolTalk, Ultra, Ultracomputing, Ultraserver, Where The Network Is Going, Sun WorkShop, XView, Java WorkShop, the Java Coffee Cup logo, and Visual Java are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries.
THIS PUBLICATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. Please submit any comments to the following email address: personaljava-comments@java.sun.com Due to the tremendous interest in the PersonalJava platform, Sun may not be able to respond to each submission received on the personaljava-comments@java.sun.com alias. For further information on Intellectual Property matters, contact Sun's Legal Department:
Table of Contents
IntroductionThe PersonalJava platform addresses the software needs of networked applications running on personal consumer devices such as set-top boxes and smart phones rather than for desktop computers. Relation to JDK 1.1 APIThis document describes the facilities that the PersonalJava platform provides to applications and applets. It is not a standalone specification because it only describes the ways in which the PersonalJava API differs from the JDK 1.1 API. The PersonalJava API is derived from JDK 1.1 API, supplemented by a small number of new APIs designed to meet the needs of networked embedded applications. Java APIs introduced after JDK 1.1 will not automatically become a part of the PersonalJava API. Changes Since PersonalJava 1.0This PersonalJava API Specification has been substantially revised since PersonalJava 1.0. The organization has been streamlined and much of the explanatory material has been moved to more appropriate programming or API documentation. In addition, the definitions have been revised and condensed for clarity. Here is a list of the major content changes in the PersonalJava API Specification for version 1.1:
Definitions
PersonalJava Platform ModificationsThe PersonalJava API modifies the JDK 1.1 API at three levels: package, class and method. The following definitions describe the degrees of API support provided by the PersonalJava platform.
Java Standard ExtensionsA Java standard extension is an API that extends a specific release of the Java platform. Java standard extensions use the javax namespace. An implementation of the PersonalJava platform can support JDK 1.1-based Java standard extensions if the implementation contains the relevant optional features. Additional Reading
JDK-based APIs
java.appletThe PersonalJava platform requires full support of the JDK 1.1 API for the java.applet package. java.awtjava.awt is a modified package. The PersonalJava application environment has different levels of implementation support for the classes and methods in java.awt. These options allow a PersonalJava implementation to provide API functionality that matches the features of the underlying graphics and window system. The following table describes the modified classes.
The following table describes the optional classes.
The following table describes the modified methods.
The following table describes the optional methods.
Scrolling Controls: Implementation and BehaviorThe scrollbar display policies for some of the classes in java.awt can have meanings that are different from the equivalent JDK 1.1 classes. These changes affect the implementations of the following classes:
java.awt.datatransferThe PersonalJava platform requires full support of the JDK 1.1 API for the java.awt.datatransfer package. java.awt.eventThe PersonalJava platform requires full support of the JDK 1.1 API for the java.awt.event package. java.awt.imageThe PersonalJava platform requires full support of the JDK 1.1 API for the java.awt.image package. java.awt.peerPersonalJava applications should not directly access the java.awt.peer package. java.beansThe PersonalJava platform requires full support of the JDK 1.1 API for the java.beans package. java.iojava.io is a modified package. The following set of classes is optional as a group:
The rest of the classes in java.io are required. java.langThe PersonalJava platform requires full support of the JDK 1.1 API for the java.lang package. java.lang.reflectThe PersonalJava platform requires full support of the JDK 1.1 API for the java.lang.reflect package. java.mathjava.math is an optional package. When a PersonalJava implementation provides the java.math package it must support the full JDK 1.1 API. java.netThe PersonalJava platform requires full support of the JDK 1.1 API for the java.net package. java.rmijava.rmi is an optional package. When a PersonalJava implementation provides the java.rmi package it must support the full JDK 1.1 API of the java.rmi package and each of its sub-packages. java.rmi.dgcjava.rmi.dgc is an optional package. See the requirements for java.rmi. java.rmi.registryjava.rmi.registry is an optional package. See the requirements for java.rmi. java.rmi.serverjava.rmi.server is an optional package. See the requirements for java.rmi. java.securityjava.security is an optional package. When a PersonalJava implementation provides the java.security package it must support the full JDK 1.1 API of the java.math package and the full JDK 1.1 API of the java.security package and each of its sub-packages, except for java.security.acl. java.security.acljava.security.acl is an unsupported package. java.security.interfacesjava.security.interfaces is an optional package. See the requirements for java.security. java.sqljava.sql is an optional package. When a PersonalJava implementation provides the java.sql package it must support the full JDK 1.1 API of the java.sql and java.math packages. java.textThe PersonalJava platform requires full support of the JDK 1.1 API for the java.text package. java.text.resourcesjava.text.resources is a modified package. The following three classes in this package are required:
In addition, at least two matched locale classes are also required, one for DateFormatZoneData and one for LocaleElements, for example, DateFormatZoneData_en_US and LocaleElements_en_US. The rest of the classes in java.text.resources are optional. java.utilThe PersonalJava platform requires full support of the JDK 1.1 API for the java.util package. java.util.zipjava.util.zip is a modified package. The following table describes the degree of API support for each of the classes in the java.util.zip package.
Note: The semantics of Inflator are dependent on the implementation. If an implementation does not support the ZLIB header and checksum fields, it will have the following limitations:
New PersonalJava APIsDouble BufferingThe PersonalJava platform includes a new method for double buffering in java.awt.Component:
Because it is a new method in a JDK 1.1 class, there is no compatibility class for java.awt.Component.isDoubleBuffered. Java applications that access this method should use reflection to detect whether it is available in a Java platform. Specifying Component Input Behavior in Mouseless EnvironmentsThe PersonalJava API includes four interfaces in com.sun.awt that help applets and applications to adapt to mouseless environments like keyboard-only systems and systems operated by remote control. These input preference interfaces allow component developers to specify how users can navigate among and interact with their components.
Unsupported Optional FeaturesImplementations of the PersonalJava application environment can elect whether to support certain optional API features of the JDK. If a PersonalJava implementation does not support an optional feature, it is called an unsupported optional feature. When a Java application attempts to access an unsupported optional feature, the PersonalJava application environment handles the situation in one of the following ways:
Timer APIThe PersonalJava platform includes a set of classes in com.sun.util for creating and managing timer events.
Compatibility Classes for Non-PersonalJava PlatformsSun provides the PersonalJava Compatibility Classes to allow Java applications developed for the PersonalJava platform to run on Java platforms that lack the new PersonalJava features. The PersonalJava compatibility classes include:
Implementation Notes
Character EncodingThe character encodings available in a PersonalJava implementation are platform-specific and may be quite limited. However, an implementation must guarantee the availability of converters for ISO 8859-1 ("Latin-1"), Unicode (big- and little-endian varieties, both marked and unmarked), and the native character encoding of the platform itself. These character encodings are used by ByteArrayOutputStream, InputStreamReader, OutputStreamWriter and String. Java Native Interface (JNI)The PersonalJava platform uses the Java Native Interface for supporting native methods. Networking ProtocolsThe PersonalJava networking classes support the protocols listed below. Those marked required should be universally available. Implementors are encouraged to include those marked as optional if space and the specifics of a device or system allow it. Where a version number is listed, it represents the lowest version level that the PersonalJava platform requires.
Image FormatsThe PersonalJava platform requires the ability to handle the image formats listed below. Where a version number is listed, it represents the lowest version level that the PersonalJava platform requires.
Code SigningIf an implementation includes support for optional code signing then the PersonalJava platform can authenticate signed jar files and grant extra security privileges to the classes contained in a signed jar file.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||