Monday, October 29, 2007

array in java

java.util Class ArrayListjava.lang.Object

java.util.AbstractCollection

java.util.AbstractList

java.util.ArrayList
All Implemented Interfaces:
Serializable, Cloneable, Iterable, Collection, List, RandomAccess
Direct Known Subclasses:
AttributeList, RoleList, RoleUnresolvedList
public class ArrayListextends AbstractListimplements List, RandomAccess, Cloneable, Serializable
Resizable-array implementation of the List interface. Implements all optional list operations, and permits all elements, including null. In addition to implementing the List interface, this class provides methods to manipulate the size of the array that is used internally to store the list. (This class is roughly equivalent to Vector, except that it is unsynchronized.)
The size, isEmpty, get, set, iterator, and listIterator operations run in constant time. The add operation runs in amortized constant time, that is, adding n elements requires O(n) time. All of the other operations run in linear time (roughly speaking). The constant factor is low compared to that for the LinkedList implementation.
Each ArrayList instance has a capacity. The capacity is the size of the array used to store the elements in the list. It is always at least as large as the list size. As elements are added to an ArrayList, its capacity grows automatically. The details of the growth policy are not specified beyond the fact that adding an element has constant amortized time cost.
An application can increase the capacity of an ArrayList instance before adding a large number of elements using the ensureCapacity operation. This may reduce the amount of incremental reallocation.
Note that this implementation is not synchronized. If multiple threads access an ArrayList instance concurrently, and at least one of the threads modifies the list structurally, it must be synchronized externally. (A structural modification is any operation that adds or deletes one or more elements, or explicitly resizes the backing array; merely setting the value of an element is not a structural modification.) This is typically accomplished by synchronizing on some object that naturally encapsulates the list. If no such object exists, the list should be "wrapped" using the Collections.synchronizedList method. This is best done at creation time, to prevent accidental unsynchronized access to the list: List list = Collections.synchronizedList(new ArrayList(...));
The iterators returned by this class's iterator and listIterator methods are fail-fast: if list is structurally modified at any time after the iterator is created, in any way except through the iterator's own remove or add methods, the iterator will throw a ConcurrentModificationException. Thus, in the face of concurrent modification, the iterator fails quickly and cleanly, rather than risking arbitrary, non-deterministic behavior at an undetermined time in the future.
Note that the fail-fast behavior of an iterator cannot be guaranteed as it is, generally speaking, impossible to make any hard guarantees in the presence of unsynchronized concurrent modification. Fail-fast iterators throw ConcurrentModificationException on a best-effort basis. Therefore, it would be wrong to write a program that depended on this exception for its correctness: the fail-fast behavior of iterators should be used only to detect bugs.
This class is a member of the Java Collections Framework.
Since:
1.2
See Also:
Collection, List, LinkedList, Vector, Collections.synchronizedList(List), Serialized Form
Field Summary

Fields inherited from class java.util.AbstractList
modCount

Constructor Summary
ArrayList() Constructs an empty list with an initial capacity of ten.

ArrayList(CollectionE> c) Constructs a list containing the elements of the specified collection, in the order they are returned by the collection's iterator.

ArrayList(int initialCapacity) Constructs an empty list with the specified initial capacity.


Method Summary
boolean
add(E o) Appends the specified element to the end of this list.
void
add(int index, E element) Inserts the specified element at the specified position in this list.
boolean
addAll(CollectionE> c) Appends all of the elements in the specified Collection to the end of this list, in the order that they are returned by the specified Collection's Iterator.
boolean
addAll(int index, CollectionE> c) Inserts all of the elements in the specified Collection into this list, starting at the specified position.
void
clear() Removes all of the elements from this list.
Object
clone() Returns a shallow copy of this ArrayList instance.
boolean
contains(Object elem) Returns true if this list contains the specified element.
void
ensureCapacity(int minCapacity) Increases the capacity of this ArrayList instance, if necessary, to ensure that it can hold at least the number of elements specified by the minimum capacity argument.
E
get(int index) Returns the element at the specified position in this list.
int
indexOf(Object elem) Searches for the first occurence of the given argument, testing for equality using the equals method.
boolean
isEmpty() Tests if this list has no elements.
int
lastIndexOf(Object elem) Returns the index of the last occurrence of the specified object in this list.
E
remove(int index) Removes the element at the specified position in this list.
boolean
remove(Object o) Removes a single instance of the specified element from this list, if it is present (optional operation).
protected void
removeRange(int fromIndex, int toIndex) Removes from this List all of the elements whose index is between fromIndex, inclusive and toIndex, exclusive.
E
set(int index, E element) Replaces the element at the specified position in this list with the specified element.
int
size() Returns the number of elements in this list.
Object[]
toArray() Returns an array containing all of the elements in this list in the correct order.
T[]
toArray(T[] a) Returns an array containing all of the elements in this list in the correct order; the runtime type of the returned array is that of the specified array.
void
trimToSize() Trims the capacity of this ArrayList instance to be the list's current size.

Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList

Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll, toString

Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList

Constructor Detail
ArrayListpublic ArrayList(int initialCapacity)
Constructs an empty list with the specified initial capacity.
Parameters:
initialCapacity - the initial capacity of the list.
Throws:
IllegalArgumentException - if the specified initial capacity is negative
ArrayListpublic ArrayList()
Constructs an empty list with an initial capacity of ten.
ArrayListpublic ArrayList(CollectionE> c)
Constructs a list containing the elements of the specified collection, in the order they are returned by the collection's iterator. The ArrayList instance has an initial capacity of 110% the size of the specified collection.
Parameters:
c - the collection whose elements are to be placed into this list.
Throws:
NullPointerException - if the specified collection is null.
Method Detail
trimToSizepublic void trimToSize()
Trims the capacity of this ArrayList instance to be the list's current size. An application can use this operation to minimize the storage of an ArrayList instance.
ensureCapacitypublic void ensureCapacity(int minCapacity)
Increases the capacity of this ArrayList instance, if necessary, to ensure that it can hold at least the number of elements specified by the minimum capacity argument.
Parameters:
minCapacity - the desired minimum capacity.
sizepublic int size()
Returns the number of elements in this list.
Specified by:
size in interface Collection<E>
Specified by:
size in interface List<E>
Specified by:
size in class AbstractCollection<E>
Returns:
the number of elements in this list.
isEmptypublic boolean isEmpty()
Tests if this list has no elements.
Specified by:
isEmpty in interface Collection<E>
Specified by:
isEmpty in interface List<E>
Overrides:
isEmpty in class AbstractCollection<E>
Returns:
true if this list has no elements; false otherwise.
containspublic boolean contains(Object elem)
Returns true if this list contains the specified element.
Specified by:
contains in interface Collection<E>
Specified by:
contains in interface List<E>
Overrides:
contains in class AbstractCollection<E>
Parameters:
elem - element whose presence in this List is to be tested.
Returns:
true if the specified element is present; false otherwise.
indexOfpublic int indexOf(Object elem)
Searches for the first occurence of the given argument, testing for equality using the equals method.
Specified by:
indexOf in interface List<E>
Overrides:
indexOf in class AbstractList<E>
Parameters:
elem - an object.
Returns:
the index of the first occurrence of the argument in this list; returns -1 if the object is not found.
See Also:
Object.equals(Object)
lastIndexOfpublic int lastIndexOf(Object elem)
Returns the index of the last occurrence of the specified object in this list.
Specified by:
lastIndexOf in interface List<E>
Overrides:
lastIndexOf in class AbstractList<E>
Parameters:
elem - the desired element.
Returns:
the index of the last occurrence of the specified object in this list; returns -1 if the object is not found.
clonepublic Object clone()
Returns a shallow copy of this ArrayList instance. (The elements themselves are not copied.)
Overrides:
clone in class Object
Returns:
a clone of this ArrayList instance.
See Also:
Cloneable
toArraypublic Object[] toArray()
Returns an array containing all of the elements in this list in the correct order.
Specified by:
toArray in interface Collection<E>
Specified by:
toArray in interface List<E>
Overrides:
toArray in class AbstractCollection<E>
Returns:
an array containing all of the elements in this list in the correct order.
See Also:
Arrays.asList(Object[])
toArraypublic T[] toArray(T[] a)
Returns an array containing all of the elements in this list in the correct order; the runtime type of the returned array is that of the specified array. If the list fits in the specified array, it is returned therein. Otherwise, a new array is allocated with the runtime type of the specified array and the size of this list.
If the list fits in the specified array with room to spare (i.e., the array has more elements than the list), the element in the array immediately following the end of the collection is set to null. This is useful in determining the length of the list only if the caller knows that the list does not contain any null elements.
Specified by:
toArray in interface Collection<E>
Specified by:
toArray in interface List<E>
Overrides:
toArray in class AbstractCollection<E>
Parameters:
a - the array into which the elements of the list are to be stored, if it is big enough; otherwise, a new array of the same runtime type is allocated for this purpose.
Returns:
an array containing the elements of the list.
Throws:
ArrayStoreException - if the runtime type of a is not a supertype of the runtime type of every element in this list.
getpublic E get(int index)
Returns the element at the specified position in this list.
Specified by:
get in interface List<E>
Specified by:
get in class AbstractList<E>
Parameters:
index - index of element to return.
Returns:
the element at the specified position in this list.
Throws:
IndexOutOfBoundsException - if index is out of range (index <>= size()).
setpublic E set(int index, E element)
Replaces the element at the specified position in this list with the specified element.
Specified by:
set in interface List<E>
Overrides:
set in class AbstractList<E>
Parameters:
index - index of element to replace.
element - element to be stored at the specified position.
Returns:
the element previously at the specified position.
Throws:
IndexOutOfBoundsException - if index out of range (index <>= size()).
addpublic boolean add(E o)
Appends the specified element to the end of this list.
Specified by:
add in interface Collection<E>
Specified by:
add in interface List<E>
Overrides:
add in class AbstractList<E>
Parameters:
o - element to be appended to this list.
Returns:
true (as per the general contract of Collection.add).
addpublic void add(int index, E element)
Inserts the specified element at the specified position in this list. Shifts the element currently at that position (if any) and any subsequent elements to the right (adds one to their indices).
Specified by:
add in interface List<E>
Overrides:
add in class AbstractList<E>
Parameters:
index - index at which the specified element is to be inserted.
element - element to be inserted.
Throws:
IndexOutOfBoundsException - if index is out of range (index <> size()).
removepublic E remove(int index)
Removes the element at the specified position in this list. Shifts any subsequent elements to the left (subtracts one from their indices).
Specified by:
remove in interface List<E>
Overrides:
remove in class AbstractList<E>
Parameters:
index - the index of the element to removed.
Returns:
the element that was removed from the list.
Throws:
IndexOutOfBoundsException - if index out of range (index <>= size()).
removepublic boolean remove(Object o)
Removes a single instance of the specified element from this list, if it is present (optional operation). More formally, removes an element e such that (o==null ? e==null : o.equals(e)), if the list contains one or more such elements. Returns true if the list contained the specified element (or equivalently, if the list changed as a result of the call).
Specified by:
remove in interface Collection<E>
Specified by:
remove in interface List<E>
Overrides:
remove in class AbstractCollection<E>
Parameters:
o - element to be removed from this list, if present.
Returns:
true if the list contained the specified element.
clearpublic void clear()
Removes all of the elements from this list. The list will be empty after this call returns.
Specified by:
clear in interface Collection<E>
Specified by:
clear in interface List<E>
Overrides:
clear in class AbstractList<E>
addAllpublic boolean addAll(CollectionE> c)
Appends all of the elements in the specified Collection to the end of this list, in the order that they are returned by the specified Collection's Iterator. The behavior of this operation is undefined if the specified Collection is modified while the operation is in progress. (This implies that the behavior of this call is undefined if the specified Collection is this list, and this list is nonempty.)
Specified by:
addAll in interface Collection<E>
Specified by:
addAll in interface List<E>
Overrides:
addAll in class AbstractCollection<E>
Parameters:
c - the elements to be inserted into this list.
Returns:
true if this list changed as a result of the call.
Throws:
NullPointerException - if the specified collection is null.
See Also:
AbstractCollection.add(Object)
addAllpublic boolean addAll(int index, CollectionE> c)
Inserts all of the elements in the specified Collection into this list, starting at the specified position. Shifts the element currently at that position (if any) and any subsequent elements to the right (increases their indices). The new elements will appear in the list in the order that they are returned by the specified Collection's iterator.
Specified by:
addAll in interface List<E>
Overrides:
addAll in class AbstractList<E>
Parameters:
index - index at which to insert first element from the specified collection.
c - elements to be inserted into this list.
Returns:
true if this list changed as a result of the call.
Throws:
IndexOutOfBoundsException - if index out of range (index <> size()).
NullPointerException - if the specified Collection is null.
removeRangeprotected void removeRange(int fromIndex, int toIndex)
Removes from this List all of the elements whose index is between fromIndex, inclusive and toIndex, exclusive. Shifts any succeeding elements to the left (reduces their index). This call shortens the list by (toIndex - fromIndex) elements. (If toIndex==fromIndex, this operation has no effect.)
Overrides:
removeRange in class AbstractList<E>
Parameters:
fromIndex - index of first element to be removed.
toIndex - index after last element to be removed.


javadoc - The Java API Documentation Generator
Generates HTML pages of API documentation from Java source files. This document contains JavadocTM examples for Microsoft Windows.
CONTENTS
Reference Guide
Synopsis
Description
Processing of Source Files
Javadoc Doclets
Related Documentation
Terminology
Source Files
Class Source Code Files
Package Comment Files
Overview Comment File
Miscellaneous Unprocessed Files
Test Files and Template Files
Generated Files
Generated API Declarations
Documentation Comments
Commenting the Source Code
Automatic Copying of Method Comments
Javadoc Tags (@tag)
Where Tags Can Be Used
Options (-option)
Javadoc Options
Options Provided by the Standard Doclet
Command Line Argument Files
Running
Running Javadoc
Simple Examples
Documenting One or More Packages
Documenting One or More Classes
Documenting Both Packages and Classes
Real World Example
Command Line Example
Makefile Example
Troubleshooting
General Troubleshooting
Errors and Warnings
Environment
CLASSPATH
Troubleshooting
See Also
Reference Guide
SYNOPSIS
javadoc [ options ] [ packagenames ] [ sourcefilenames ] [ -subpackages pkg1:pkg2:... ] [ @argfiles ]
Arguments can be in any order. See processing of Source Files for details on how the Javadoc tool determines which ".java" files to process.
options
Command-line options, as specified in this document. To see a typical use of javadoc options, see Real-World Example.
packagenames
A series of names of packages, separated by spaces, such as java.lang java.lang.reflect java.awt. You must separately specify each package you want to document. Wildcards are not allowed; use -subpackages for recursion. The Javadoc tool uses -sourcepath to look for these package names. See Example - Documenting One or More Packages
sourcefilenames
A series of source file names, separated by spaces, each of which can begin with a path and contain a wildcard such as asterisk (*). The Javadoc tool will process every file whose name ends with ".java", and whose name, when stripped of that suffix, is actually a legal class name (see Identifiers). Therefore, you can name files with dashes (such as X-Buffer), or other illegal characters, to prevent them from being documented. This is useful for test files and template files The path that precedes the source file name determines where javadoc will look for the file. (The Javadoc tool does not use -sourcepath to look for these source file names.) Relative paths are relative to the current directory, so passing in Button.java is identical to ./Button.java. A source file name with an absolute path and a wildcard, for example, is /home/src/java/awt/Graphics*.java. See Example - Documenting One or More Classes. You can also mix packagenames and sourcefilenames, as in Example - Documenting Both Packages and Classes
-subpackages pkg1:pkg2:...
Generates documentation from source files in the specified packages and recursively in their subpackages. An alternative to supplying packagenames or sourcefilenames.
@argfiles
One or more files that contain a list of Javadoc options, packagenames and sourcefilenames in any order. Wildcards (*) and -J options are not allowed in these files.
DESCRIPTION
The JavadocTM tool parses the declarations and documentation comments in a set of Java source files and produces a corresponding set of HTML pages describing (by default) the public and protected classes, nested classes (but not anonymous inner classes), interfaces, constructors, methods, and fields. You can use it to generate the API (Application Programming Interface) documentation or the implementation documentation for a set of source files.
You can run the Javadoc tool on entire packages, individual source files, or both. When documenting entire packages, you can either use -subpackages for traversing recursively down from a top-level directory, or pass in an explicit list of package names. When documenting individual source files, you pass in a list of source (.java) filenames. Examples are given at the end of this document. How Javadoc processes source files is covered next.
Processing of source files
The Javadoc tool processes files that end in ".java" plus other files described under Source Files. If you run the Javadoc tool by explicitly passing in individual source filenames, you can determine exactly which ".java" files are processed. However, that is not how most developers want to work, as it is simpler to pass in package names. The Javadoc tool can be run three ways without explicitly specifying the source filenames. You can (1) pass in package names, (2) use -subpackages, and (3) use wildcards with source filenames (*.java). In these cases, the Javadoc tool processes a ".java" file only if it fulfills all of the following requirements:
· Its name, after stripping off the ".java" suffix, is actually a legal class name (see Identifiers for legal characters)
· Its directory path relative to the root of the source tree is actually a legal package name (after converting its separators to dots)
· Its package statement contains the legal package name (specified in the previous bullet)
Processing of links - During a run, the Javadoc tool automatically adds cross-reference links to package, class and member names that are being documented as part of that run. Links appear in several places:
· Declarations (return types, argument types, field types)
· "See Also" sections generated from @see tags
· In-line text generated from {@link} tags
· Exception names generated from @throws tags
· "Specified by" links to members in interfaces and "Overrides" links to members in classes
· Summary tables listing packages, classes and members
· Package and class inheritance trees
· The index
You can add hyperlinks to existing text for classes not included on the command line (but generated separately) by way of the -link and -linkoffline options.
Other processing details - The Javadoc tool produces one complete document each time it is run; it cannot do incremental builds -- that is, it cannot modify or directly incorporate results from previous runs of the Javadoc tool. However, it can link to results from other runs, as just mentioned.
As implemented, the Javadoc tool requires and relies on the java compiler to do its job. The Javadoc tool calls part of javac to compile the declarations, ignoring the member implementation. It builds a rich internal representation of the classes, including the class hierarchy, and "use" relationships, then generates the HTML from that. The Javadoc tool also picks up user-supplied documentation from documentation comments in the source code.
In fact, the Javadoc tool will run on .java source files that are pure stub files with no method bodies. This means you can write documentation comments and run the Javadoc tool in the earliest stages of design while creating the API, before writing the implementation.
Relying on the compiler ensures that the HTML output corresponds exactly with the actual implementation, which may rely on implicit, rather than explicit, source code. For example, the Javadoc tool documents default constructors (section 8.6.7 of Java Language Specification) that are present in the .class files but not in the source code.
In many cases, the Javadoc tool allows you to generate documentation for source files whose code is incomplete or erroneous. This is a benefit that enables you to generate documentation before all debugging and troubleshooting is done. For example, according to the Java Language Specification, a class that contains an abstract method should itself be declared abstract. The Javadoc tool does not check for this, and would proceed without a warning, whereas the javac compiler stops on this error. The Javadoc tool does do some primitive checking of doc comments. Use the DocCheck doclet to check the doc comments more thoroughly.
When the Javadoc tool builds its internal structure for the documentation, it loads all referenced classes. Because of this, the Javadoc tool must be able to find all referenced classes, whether bootstrap classes, extensions, or user classes. For more about this, see How Classes Are Found. Generally speaking, classes you create must either be loaded as an extension or in the Javadoc tool's class path.
Javadoc Doclets
You can customize the content and format of the Javadoc tool's output by using doclets. The Javadoc tool has a default "built-in" doclet, called the standard doclet, that generates HTML-formatted API documentation. You can modify or subclass the standard doclet, or write your own doclet to generate HTML, XML, MIF, RTF or whatever output format you'd like. Information about doclets and their use is at the following locations:
· Javadoc Doclets
· The -doclet command-line option
When a custom doclet is not specified with the -doclet command line option, the Javadoc tool will use the default standard doclet. The javadoc tool has several command line options that are available regardless of which doclet is being used. The standard doclet adds a supplementary set of command line options. Both sets of options are described below in the options section.
Related Documentation and Doclets
· Javadoc Enhancements for details about improvements added in Javadoc.
· Javadoc FAQ for answers to common questions, information about Javadoc-related tools, and workarounds for bugs.
· How to Write Doc Comments for Javadoc for more information about Sun conventions for writing documentation comments.
· Requirements for Writing API Specifications - Standard requirements used when writing the Java 2 Platform Specification. It can be useful whether you are writing API specifications in source file documentation comments or in other formats. It covers requirements for packages, classes, interfaces, fields and methods to satisfy testable assertions.
· Documentation Comment Specification - The original specification on documentation comments, Chapter 18, Documentation Comments, in the Java Language Specification, First Edition, by James Gosling, Bill Joy, and Guy Steele. (This chapter was removed from the second edition.)
· DocCheck Doclet - Checks doc comments in source files and generates a report listing the errors and irregularities it finds. It is part of the Sun Doc Check Utilities.
· MIF Doclet - Can automate the generation of API documentation in MIF, FrameMaker and PDF formats. MIF is Adobe FrameMaker's interchange format.
Terminology
The terms documentation comment, doc comment, main description, tag, block tag, and in-line tag are described at Documentation Comments. These other terms have specific meanings within the context of the Javadoc tool:
generated document
The document generated by the javadoc tool from the doc comments in Java source code. The default generated document is in HTML and is created by the standard doclet.
name
A name of a program element written in the Java Language -- that is, the name of a package, class, interface, field, constructor or method. A name can be fully-qualified, such as java.lang.String.equals(java.lang.Object), or partially-qualified, such as equals(Object).
documented classes
The classes and interfaces for which detailed documentation is generated during a javadoc run. To be documented, the source files must be available, their source filenames or package names must be passed into the javadoc command, and they must not be filtered out by their access modifier (public, protected, package-private or private). We also refer to these as the classes included in the javadoc output, or the included classes.
included classes
Classes and interfaces whose details are documented during a run of the Javadoc tool. Same as documented classes.
excluded classes
Classes and interfaces whose details are not documented during a run of the Javadoc tool.
referenced classes
The classes and interfaces that are explicitly referred to in the definition (implementation) or doc comments of the documented classes and interfaces. Examples of references include return type, parameter type, cast type, extended class, implemented interface, imported classes, classes used in method bodies, @see, {@link}, {@linkplain}, and {@inheritDoc} tags. (Notice this definition has changed since 1.3.) When the Javadoc tool is run, it should load into memory all of the referenced classes in javadoc's bootclasspath and classpath. (The Javadoc tool prints a "Class not found" warning for referenced classes not found.) The Javadoc tool can derive enough information from the .class files to determine their existence and the fully-qualified names of their members.
external referenced classes
The referenced classes whose documentation is not being generated during a javadoc run. In other words, these classes are not passed into the Javadoc tool on the command line. Links in the generated documentation to those classes are said to be external references or external links. For example, if you run the Javadoc tool on only the java.awt package, then any class in java.lang, such as Object, is an external referenced class. External referenced classes can be linked to using the -link and -linkoffline options. An important property of an external referenced class is that its source comments are normally not available to the Javadoc run. In this case, these comments cannot be inherited.
SOURCE FILES
The Javadoc tool will generate output originating from four different types of "source" files: Java language source files for classes (.java), package comment files, overview comment files, and miscellaneous unprocessed files. This section also covers test files and template files that can also be in the source tree, but which you want to be sure not to document.
Class Source Code Files
Each class or interface and its members can have their own documentation comments, contained in a .java file. For more details about these doc comments, see Documentation Comments.
Package Comment Files
Each package can have its own documentation comment, contained in its own "source" file, that the Javadoc tool will merge into the package summary page that it generates. You typically include in this comment any documentation that applies to the entire package.
To create a package comment file, you have a choice of two files to place your comments:
· package-info.java - Can contain a package declaration, package annotations, package comments and Javadoc tags. This file is new in JDK 5.0, and is preferred over package.html.
· package.html - Can contain only package comments and Javadoc tags, no package annotations.
A package may have a single package.html file or a single package-info.java file but not both. Place either file in the package directory in the source tree along with your .java files.
package-info.java This file can contain a package comment of the following structure -- the comment is placed before the package declaration:
File: java/applet/package-info.java
/** * Provides the classes necessary to create an applet and the classes an applet uses * to communicate with its applet context. *

* The applet framework involves two entities: * the applet and the applet context. An applet is an embeddable window (see the * {@link java.awt.Panel} class) with a few extra methods that the applet context * can use to initialize, start, and stop the applet. * * @since 1.0 * @see java.awt */package java.lang.applet;
Note that while the comment separators /** and /* must be present, the leading asterisks on the intermediate lines can be omitted. package.html - This file can contain a package comment of the following structure -- the comment is placed in the element:
File: java/applet/package.html
Provides the classes necessary to create an applet and the classes an applet uses to communicate with its applet context.

The applet framework involves two entities: the applet and the applet context. An applet is an embeddable window (see the {@link java.awt.Panel} class) with a few extra methods that the applet context can use to initialize, start, and stop the applet. @since 1.0@see java.awt
Notice this is just a normal HTML file and does not include a package declaration. The content of the package comment file is written in HTML, like all other comments, with one exception: The documentation comment should not include the comment separators /** and */ or leading asterisks. When writing the comment, you should make the first sentence a summary about the package, and not put a title or any other text between and the first sentence. You can include package tags; as with any documentation comment, all block tags must appear after the main description. If you add a @see tag in a package comment file, it must have a fully-qualified name. For more details, see the example of package.html.
Processing of package comment file - When the Javadoc tool runs, it will automatically look for the package comment file; if found, the Javadoc tool does the following:
· Copies the comment for processing. (For package.html, copies all content between and HTML tags. You can include a section to put a , source file copyright statement, or other information, but none of these will appear in the generated documentation.)<br />· Processes any <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">package tags</a> that are present.<br />· Inserts the processed text at the bottom of the package summary page it generates, as shown in <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaappletpackage-summary.html">Package Summary</a>.<br />· Copies the first sentence of the package comment to the top of the package summary page. It also adds the package name and this first sentence to the list of packages on the overview page, as shown in <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapioverview-summary.html">Overview Summary</a>. The end-of-sentence is determined by the same rules used for the end of the first sentence of class and member main descriptions.<br />Overview Comment File<br />Each application or set of packages that you are documenting can have its own overview documentation comment, kept in its own "source" file, that the Javadoc tool will merge into the overview page that it generates. You typically include in this comment any documentation that applies to the entire application or set of packages.<br />To create an overview comment file, you can name the file anything you want, typically overview.html and place it anywhere, typically at the top level of the source tree. For example, if the source files for the java.applet package are contained in C:\user\src\java\applet directory, you could create an overview comment file at C:\user\src\overview.html.<br />Notice you can have multiple overview comment files for the same set of source files, in case you want to run javadoc multiple times on different sets of packages. For example, you could run javadoc once with -private for internal documentation and again without that option for public documentation. In this case, you could describe the documentation as public or internal in the first sentence of each overview comment file.<br />The content of the overview comment file is one big documentation comment, written in HTML, like the package comment file described previously. See that description for details. To re-iterate, when writing the comment, you should make the first sentence a summary about the application or set of packages, and not put a title or any other text between <body> and the first sentence. You can include <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">overview tags</a>; as with any documentation comment, all tags except in-line tags, such as {@link}, must appear after the main description. If you add a @see tag, it must have a fully-qualified name.<br />When you run the Javadoc tool, you specify the overview comment file name with the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">-overview</a> option. The file is then processed similar to that of a package comment file.<br />· Copies all content between <body> and </body> tags for processing.<br />· Processes any <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">overview tags</a> that are present.<br />· Inserts the processed text at the bottom of the overview page it generates, as shown in <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapioverview-summary.html">Overview Summary</a>.<br />· Copies the first sentence of the overview comment to the top of the overview summary page.<br />Miscellaneous Unprocessed Files<br />You can also include in your source any miscellaneous files that you want the Javadoc tool to copy to the destination directory. These typically includes graphic files, example Java source (.java) and class (.class) files, and self-standing HTML files whose content would overwhelm the documentation comment of a normal Java source file.<br />To include unprocessed files, put them in a directory called doc-files which can be a subdirectory of any package directory that contains source files. You can have one such subdirectory for each package. You might include images, example code, source files, .class files, applets and HTML files. For example, if you want to include the image of a button button.gif in the java.awt.Button class documentation, you place that file in the /home/user/src/java/awt/doc-files/ directory. Notice the doc-files directory should not be located at /home/user/src/java/doc-files because java is not a package -- that is, it does not directly contain any source files.<br />All links to these unprocessed files must be hard-coded, because the Javadoc tool does not look at the files -- it simply copies the directory and all its contents to the destination. For example, the link in the Button.java doc comment might look like: /** * This button looks like this: * <img src="doc-files/Button.gif" /> */<br />Test Files and Template Files<br />Some developers have indicated they want to store test files and templates files in the source tree near their corresponding source files. That is, they would like to put them in the same directory, or a subdirectory, of those source files.<br />If you run the Javadoc tool by explicitly passing in individual source filenames, you can deliberately omit test and templates files and prevent them from being processed. However, if you are passing in package names or wildcards, you need to follow certain rules to ensure these test files and templates files are not processed.<br />Test files differ from template files in that the former are legal, compilable source files, while the latter are not, but may end with ".java".<br />Test files - Often developers want to put compilable, runnable test files for a given package in the same directory as the source files for that package. But they want the test files to belong to a package other than the source file package, such as the unnamed package (so the test files have no package statement or a different package statement from the source). In this scenario, when the source is being documented by specifying its package name specified on the command line, the test files will cause warnings or errors. You need to put such test files in a subdirectory. For example, if you want to add test files for source files in com.package1, put them in a subdirectory that would be an invalid package name (because it contains a hyphen): com/package1/test-files/<br />The test directory will be skipped by the Javadoc tool with no warnings.<br />If your test files contain doc comments, you can set up a separate run of the Javadoc tool to produce documentation of the test files by passing in their test source filenames with wildcards, such as com/package1/test-files/*.java.<br />Templates for source files - Template files have names that often end in ".java" and are not compilable. If you have a template for a source file that you want to keep in the source directory, you can name it with a dash (such as Buffer-Template.java), or any other illegal Java character, to prevent it from being processed. This relies on the fact that the Javadoc tool will only process source files whose name, when stripped of the ".java" suffix, is actually a legal class name (see <a href="http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#40625">Identifiers</a>).<br />GENERATED FILES<br />By default, javadoc uses a standard doclet that generates HTML-formatted documentation. This doclet generates the following kinds of files (where each HTML "page" corresponds to a separate file). Note that javadoc generates files with two types of names: those named after classes/interfaces, and those that are not (such as package-summary.html). Files in the latter group contain hyphens to prevent filename conflicts with those in the former group.<br />Basic Content Pages<br />· One class or interface page (classname.html) for each class or interface it is documenting.<br />· One package page (package-summary.html) for each package it is documenting. The Javadoc tool will include any HTML text provided in a file named package.html or package-info.java in the package directory of the source tree.<br />· One overview page (overview-summary.html) for the entire set of packages. This is the front page of the generated document. The Javadoc tool will include any HTML text provided in a file specified with the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">-overview</a> option. Note that this file is created only if you pass into javadoc two or more package names. For further explanation, see <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">HTML Frames</a>.)<br />Cross-Reference Pages<br />· One class hierarchy page for the entire set of packages (overview-tree.html). To view this, click on "Overview" in the navigation bar, then click on "Tree".<br />· One class hierarchy page for each package (package-tree.html) To view this, go to a particular package, class or interface page; click "Tree" to display the hierarchy for that package.<br />· One "use" page for each package (package-use.html) and a separate one for each class and interface (class-use/classname.html). This page describes what packages, classes, methods, constructors and fields use any part of the given class, interface or package. Given a class or interface A, its "use" page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.<br />· A deprecated API page (deprecated-list.html) listing all deprecated names. (A deprecated name is not recommended for use, generally due to improvements, and a replacement name is usually given. Deprecated APIs may be removed in future implementations.)<br />· A constant field values page (constant-values.html) for the values of static fields.<br />· A serialized form page (serialized-form.html) for information about serializable and externalizable classes. Each such class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class comment. The standard doclet automatically generates a <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">serialized form page</a>: any class (public or non-public) that implements Serializable is included, along with readObject and writeObject methods, the fields that are serialized, and the doc comments from the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">@serial</a>, <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">@serialField</a>, and <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">@serialData</a> tags. Public serializable classes can be excluded by marking them (or their package) with @serial exclude, and package-private serializable classes can be included by marking them (or their package) with @serial include. As of 1.4, you can generate the complete serialized form for public and private classes by running javadoc without specifying the -private option.<br />· An index (index-*.html) of all class, interface, constructor, field and method names, alphabetically arranged. This is internationalized for Unicode and can be generated as a single file or as a separate file for each starting character (such as A-Z for English).<br />Support Files<br />· A help page (help-doc.html) that describes the navigation bar and the above pages. You can provide your own custom help file to override the default using <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">-helpfile</a>.<br />· One index.html file which creates the HTML frames for display. This is the file you load to display the front page with frames. This file itself contains no text content.<br />· Several frame files (*-frame.html) containing lists of packages, classes and interfaces, used when HTML frames are being displayed.<br />· A package list file (package-list), used by the -link and -linkoffline options. This is a text file, not HTML, and is not reachable through any links.<br />· A style sheet file (stylesheet.css) that controls a limited amount of color, font family, font size, font style and positioning on the generated pages.<br />· A doc-files directory that holds any image, example, source code or other files that you want copied to the destination directory. These files are not processed by the Javadoc tool in any manner -- that is, any javadoc tags in them will be ignored. This directory is not generated unless it exists in the source tree.<br />HTML Frames<br />The Javadoc tool will generate either two or three HTML frames, as shown in the figure below. It creates the minimum necessary number of frames by omitting the list of packages if there is only one package (or no packages). That is, when you pass a single package name or source files (*.java) belonging to a single package as arguments into the javadoc command, it will create only one frame (C) in the left-hand column -- the list of classes. When you pass into javadoc two or more package names, it creates a third frame (P) listing all packages, as well as an overview page (Detail). This overview page has the filename overview-summary.html. Thus, this file is created only if you pass in two or more package names. You can bypass frames by clicking on the "No Frames" link or entering at overview-summary.html.<br />If you are unfamiliar with HTML frames, you should be aware that frames can have focus for printing and scrolling. To give a frame focus, click on it. Then on many browsers the arrow keys and page keys will scroll that frame, and the print menu command will print it. ------------ ------------ C Detail P Detail - C ------------ ------------ javadoc *.java javadoc java.lang java.awt<br />Load one of the following two files as the starting page depending on whether you want HTML frames or not:<br />· index.html (for frames)<br />· overview-summary.html (for no frames)<br />Generated File Structure<br />The generated class and interface files are organized in the same directory hierarchy that Java source files and class files are organized. This structure is one directory per subpackage.<br />For example, the document generated for the class java.applet.Applet class would be located at java\applet\Applet.html. The file structure for the java.applet package follows, given that the destination directory is named apidocs. All files that contain the word "frame" appear in the upper-left or lower-left frames, as noted. All other HTML files appear in the right-hand frame.<br />NOTE - Directories are shown in bold. The asterisks (*) indicate the files and directories that are omitted when the arguments to javadoc are source filenames (*.java) rather than package names. Also when arguments are source filenames, package-list is created but is empty. The doc-files directory will not be created in the destination unless it exists in the source tree. apidocs Top directory <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">index.html</a> Initial page that sets up HTML frames * <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">overview-summary.html</a> Lists all packages with first sentence summaries <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">overview-tree.html</a> Lists class hierarchy for all packages <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">deprecated-list.html</a> Lists deprecated API for all packages <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">constant-values.html</a> Lists values of static fields for all packages <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">serialized-form.html</a> Lists serialized form for all packages * <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">overview-frame.html</a> Lists all packages, used in upper-left frame <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">allclasses-frame.html</a> Lists all classes for all packages, used in lower-left frame <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">help-doc.html</a> Lists user help for how these pages are organized <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">index-all.html</a> Default index created without -splitindex option index-files Directory created with -splitindex option <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">index-<number>.html</a> Index files created with -splitindex option <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">package-list</a> Lists package names, used only for resolving external refs <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">stylesheet.css</a> HTML style sheet for defining fonts, colors and positions java Package directory applet Subpackage directory Applet.html Page for Applet class AppletContext.html Page for AppletContext interface AppletStub.html Page for AppletStub interface AudioClip.html Page for AudioClip interface * <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">package-summary.html</a> Lists classes with first sentence summaries for this package * <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">package-frame.html</a> Lists classes in this package, used in lower left-hand frame * <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">package-tree.html</a> Lists class hierarchy for this package <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">package-use</a> Lists where this package is used <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">doc-files</a> Directory holding image and example files <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">class-use</a> Directory holding pages API is used Applet.html Page for uses of Applet class AppletContext.html Page for uses of AppletContext interface AppletStub.html Page for uses of AppletStub interface AudioClip.html Page for uses of AudioClip interface src-html Source code directory java Package directory applet Subpackage directory Applet.html Page for Applet source code AppletContext.html Page for AppletContext source code AppletStub.html Page for AppletStub source code AudioClip.html Page for AudioClip source code<br />Generated API Declarations<br />The Javadoc tool generates a declaration at the start of each class, interface, field, constructor, and method description for that API item. For example, the declaration for the Boolean class is:<br />public final class Booleanextends Objectimplements Serializable<br />and the declaration for the Boolean.valueOfmethod is:<br />public static Boolean valueOf(String s)<br />The Javadoc tool can include the modifiers public, protected, private, abstract, final, static, transient, and volatile, but not synchronized or native. These last two modifiers are considered implementation detail and not part of the API specification.<br />Rather than relying on the keyword synchronized, APIs should document their concurrency semantics in the comment's main description, as in "a single Enumeration cannot be used by multiple threads concurrently". The document should not describe how to achieve these semantics. As another example, while Hashtable should be thread-safe, there's no reason to specify that we achieve this by synchronizing all of its exported methods. We should reserve the right to synchronize internally at the bucket level, thus offering higher concurrency.<br />DOCUMENTATION COMMENTS<br />The original "Documentation Comment Specification" can be found under <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">related documentation</a>.<br />Commenting the Source Code<br />You can include documentation comments ("doc comments") in the source code, ahead of declarations for any class, interface, method, constructor, or field. You can also create doc comments for each <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">package</a> and another one for the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">overview</a>, though their syntax is slightly different. Doc comments are also known informally as "Javadoc comments" (but this term violates its trademark usage). A doc comment consists of the characters between the characters /** that begin the comment and the characters */ that end it. <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">Leading asterisks</a> are allowed on each line and are described further below. The text in a comment can continue onto multiple lines. /** * This is the typical format of a simple documentation comment * that spans two lines. */<br />To save space you can put a comment on one line: /** This comment takes up only one line. */<br />Placement of comments - Documentation comments are recognized only when placed immediately before class, interface, constructor, method, or field declarations -- see the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">class example</a>, <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">method example</a>, and <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">field example</a>. Documentation comments placed in the body of a method are ignored. Only one documentation comment per declaration statement is recognized by the Javadoc tool.<br />A common mistake is to put an import statement between the class comment and the class declaration. Avoid this, as the Javadoc tool will ignore the class comment. /** * This is the class comment for the class Whatever. */ import com.sun; // MISTAKE - Important not to put import statement here public class Whatever { }<br />A doc comment is composed of a main description followed by a tag section - The main description begins after the starting delimiter /** and continues until the tag section. The tag section starts with the first block tag, which is defined by the first @ character that begins a line (ignoring leading asterisks, white space, and leading separator /**). It is possible to have a comment with only a tag section and no main description. The main description cannot continue after the tag section begins. The argument to a tag can span multiple lines. There can be any number of tags -- some types of tags can be repeated while others cannot. For example, this @see starts the tag section: /** * This sentence would hold the main description for this doc comment. * @see java.lang.Object */<br />Block tags and in-line tags - A <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">tag</a> is a special keyword within a doc comment that the Javadoc tool can process. There are two kinds of tags: <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">block tags</a>, which appear as @tag (also known as "standalone tags"), and <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">in-line tags</a>, which appear within curly braces, as {@tag}. To be interpreted, a block tag must appear at the beginning of a line, ignoring leading asterisks, white space, and separator (/**). This means you can use the @ character elsewhere in the text and it will not be interpreted as the start of a tag. If you want to start a line with the @ character and not have it be interpreted, use the HTML entity @. Each block tag has associated text, which includes any text following the tag up to, but not including, either the next tag, or the end of the doc comment. This associated text can span multiple lines. An in-line tag is allowed and interpreted anywhere that text is allowed. The following example contains the block tag @deprecated and in-line tag {@link}. /** * @deprecated As of JDK 1.1, replaced by {@link #setBounds(int,int,int,int)} */<br />Comments are written in HTML - The text must be written in HTML, in that they should use HTML entities and can use HTML tags. You can use whichever version of HTML your browser supports; we have written the standard doclet to generate HTML 3.2-compliant code elsewhere (outside of the documentation comments) with the inclusion of cascading style sheets and frames. (We preface each generated file with "HTML 4.0" because of the frame sets.)<br />For example, entities for the less-than (<) and greater-than (>) symbols should be written < and >. Likewise, the ampersand (&) should be written &. The bold HTML tag <b> is shown in the following example.<br />Here is a doc comment: /** * This is a <b>doc</b> comment. * @see java.lang.Object */<br />Leading asterisks - When javadoc parses a doc comment, leading asterisk (*) characters on each line are discarded; blanks and tabs preceding the initial asterisk (*) characters are also discarded. Starting with 1.4, if you omit the leading asterisk on a line, the leading white space is no longer removed. This enables you to paste code examples directly into a doc comment inside a <pre> tag, and its indentation will be honored. Spaces are generally interpreted by browsers more uniformly than tabs. Indentation is relative to the left margin (rather than the separator /** or <pre> tag).<br />First sentence - The first sentence of each doc comment should be a summary sentence, containing a concise but complete description of the declared entity. This sentence ends at the first period that is followed by a blank, tab, or line terminator, or at the first <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">block tag</a>. The Javadoc tool copies this first sentence to the member summary at the top of the HTML page.<br />Declaration with multiple fields - Java allows declaring multiple fields in a single statement, but this statement can have only one documentation comment, which is copied for all fields. Therefore if you want individual documentation comments for each field, you must declare each field in a separate statement. For example, the following documentation comment doesn't make sense written as a single declaration and would be better handled as two declarations: /** * The horizontal and vertical distances of point (x,y) */public int x, y; // Avoid this <br />The Javadoc tool generates the following documentation from the above code: public int x<br />The horizontal and vertical distances of point (x,y) public int y<br />The horizontal and vertical distances of point (x,y)<br />Use header tags carefully - When writing documentation comments for members, it's best not to use HTML heading tags such as <h1> and <h2>, because the Javadoc tool creates an entire structured document and these structural tags might interfere with the formatting of the generated document. However, it is fine to use these headings in class and package comments to provide your own structure.<br />Automatic Copying of Method Comments<br />The Javadoc tool has the ability to copy or "inherit" method comments in classes and interfaces under the following two circumstances. Constructors, fields and nested classes do not inherit doc comments.<br />· Automatically inherit comment to fill in missing text - When a <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">main description</a>, or @return, @param or @throws tag is missing from a method comment, the Javadoc tool copies the corresponding main description or tag comment from the method it overrides or implements (if any), according to the algorithm below.<br />More specifically, when a @param tag for a particular parameter is missing, then the comment for that parameter is copied from the method further up the inheritance hierarchy. When a @throws tag for a particular exception is missing, the @throws tag is copied only if that exception is declared.<br />This behavior contrasts with version 1.3 and earlier, where the presence of any main description or tag would prevent all comments from being inherited.<br />· Explicitly inherit comment with {@inheritDoc} tag - Insert the inline tag <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">{@inheritDoc}</a> in a method main description or @return, @param or @throws tag comment -- the corresponding inherited main description or tag comment is copied into that spot.<br />The source file for the inherited method need only be on the path specified by <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">-sourcepath</a> for the doc comment to actually be available to copy. Neither the class nor its package needs to be passed in on the command line. This contrasts with 1.3.x and earlier releases, where the class had to be a <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">documented class</a><br />Inherit from classes and interfaces - Inheriting of comments occurs in all three possible cases of inheritance from classes and interfaces:<br />· When a method in a class overrides a method in a superclass<br />· When a method in an interface overrides a method in a superinterface<br />· When a method in a class implements a method in an interface<br />In the first two cases, for method overrides, the Javadoc tool generates a subheading "Overrides" in the documentation for the overriding method, with a link to the method it is overriding, whether or not the comment is inherited.<br />In the third case, when a method in a given class implements a method in an interface, the Javadoc tool generates a subheading "Specified by" in the documentation for the overriding method, with a link to the method it is implementing. This happens whether or not the comment is inherited.<br />Algorithm for Inheriting Method Comments - If a method does not have a doc comment, or has an {@inheritDoc} tag, the Javadoc tool searches for an applicable comment using the following algorithm, which is designed to find the most specific applicable doc comment, giving preference to interfaces over superclasses:<br />1. Look in each directly implemented (or extended) interface in the order they appear following the word implements (or extends) in the method declaration. Use the first doc comment found for this method.<br />2. If step 1 failed to find a doc comment, recursively apply this entire algorithm to each directly implemented (or extended) interface, in the same order they were examined in step 1.<br />3. If step 2 failed to find a doc comment and this is a class other than Object (not an interface):<br />a. If the superclass has a doc comment for this method, use it.<br />b. If step 3a failed to find a doc comment, recursively apply this entire algorithm to the superclass.<br />JAVADOC TAGS<br />The Javadoc tool parses special tags when they are embedded within a Java doc comment. These doc tags enable you to autogenerate a complete, well-formatted API from your source code. The tags start with an "at" sign (@) and are case-sensitive -- they must be typed with the uppercase and lowercase letters as shown. A tag must start at the beginning of a line (after any leading spaces and an optional asterisk) or it is treated as normal text. By convention, tags with the same name are grouped together. For example, put all @see tags together. <br />Tags come in two types:<br />· Block tags - Can be placed only in the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">tag section</a> that follows the main description. Block tags are of the form: @tag.<br />· Inline tags - Can be placed anywhere in the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">main description</a> or in the comments for block tags. Inline tags are denoted by curly braces: {@tag}.<br />For information about tags we might introduce in future releases, see <a href="http://java.sun.com/j2se/javadoc/proposed-tags.html">Proposed Tags</a>.<br />The current tags are:<br />Tag<br />Introduced in JDK/SDK<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">@author</a><br />1.0<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">{@code}</a><br />1.5<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">{@docRoot}</a><br />1.3<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">@deprecated</a><br />1.0<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">@exception</a><br />1.0<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">{@inheritDoc}</a><br />1.4<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">{@link}</a><br />1.2<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">{@linkplain}</a><br />1.4<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">{@literal}</a><br />1.5<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">@param</a><br />1.0<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">@return</a><br />1.0<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">@see</a><br />1.0<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">@serial</a><br />1.2<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">@serialData</a><br />1.2<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">@serialField</a><br />1.2<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">@since</a><br />1.1<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">@throws</a><br />1.2<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">{@value}</a><br />1.4<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">@version</a><br />1.0<br />For custom tags, see the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">-tag</a> option.<br />@author name-text<br />Adds an "Author" entry with the specified name-text to the generated docs when the -author option is used. A doc comment may contain multiple @author tags. You can specify one name per @author tag or multiple names per tag. In the former case, the Javadoc tool inserts a comma (,) and space between names. In the latter case, the entire text is simply copied to the generated document without being parsed. Therefore, you can use multiple names per line if you want a localized name separator other than comma.<br />For more details, see <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">Where Tags Can Be Used</a> and <a href="http://java.sun.com/j2se/javadoc/writingdoccomments/index.html#@author">writing @author tags</a>.<br />@deprecated deprecated-text<br />Note: Starting with JDK 5.0, you can deprecate a program element using the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsguidejavadocdeprecationdeprecation.html">@Deprecated annotation</a>.<br />Adds a comment indicating that this API should no longer be used (even though it may continue to work). The Javadoc tool moves the deprecated-text ahead of the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">main description</a>, placing it in italics and preceding it with a bold warning: "Deprecated". This tag is valid in all doc comments: overview, package, class, interface, constructor, method and field.<br />The first sentence of deprecated-text should at least tell the user when the API was deprecated and what to use as a replacement. The Javadoc tool copies just the first sentence to the summary section and index. Subsequent sentences can also explain why it has been deprecated. You should include a {@link} tag (for Javadoc 1.2 or later) that points to the replacement API:<br />For more details, see <a href="http://java.sun.com/j2se/javadoc/writingdoccomments/index.html#@deprecated">writing @deprecated tags</a>.<br />· For Javadoc 1.2 and later, use a {@link} tag. This creates the link in-line, where you want it. For example: · /**· * @deprecated As of JDK 1.1, replaced by {@link #setBounds(int,int,int,int)}· */<br />· For Javadoc 1.1, the standard format is to create a @see tag (which cannot be in-line) for each @deprecated tag.<br />For more about deprecation, see <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsguidejavadocdeprecationindex.html">The @deprecated tag</a>.<br />{@code text}<br />Equivalent to <code>{@literal}</code>.<br />Displays text in code font without interpreting the text as HTML markup or nested javadoc tags. This enables you to use regular angle brackets (<>) instead of the HTML entities (< and >) in doc comments, such as in parameter types (<object>), inequalities (3 <>C}<br />displays in the generated HTML page unchanged, as: A<b>C<br />The noteworthy point is that the <b> is not interpreted as bold and is in code font.<br />If you want the same functionality without the code font, use <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">{@literal}</a>.<br />{@docRoot}<br />Represents the relative path to the generated document's (destination) root directory from any generated page. It is useful when you want to include a file, such as a copyright page or company logo, that you want to reference from all generated pages. Linking to the copyright page from the bottom of each page is common.<br />This {@docRoot} tag can be used both on the command line and in a doc comment: This tag is valid in all doc comments: overview, package, class, interface, constructor, method and field, including the text portion of any tag (such as @return, @param and @deprecated).<br />1. On the command line, where the header/footer/bottom are defined: 2. javadoc -bottom '<a href="{@docRoot}/copyright.html">Copyright</a>'<br />NOTE - When using {@docRoot} this way in a make file, some makefile programs require special escaping for the brace {} characters. For example, the Inprise MAKE version 5.2 running on Windows requires double braces: {{@docRoot}}. It also requires double (rather than single) quotes to enclose arguments to options such as -bottom (with the quotes around the href argument omitted).<br />3. In a doc comment: 4. /**5. * See the <a href="{@docRoot}/copyright.html">Copyright</a>.6. */<br />The reason this tag is needed is because the generated docs are in hierarchical directories, as deep as the number of subpackages. This expression: <a href="{@docRoot}/copyright.html"><br />would resolve to: <a href="../../copyright.html"> for java/lang/Object.java<br />and <a href="../../../copyright.html"> for java/lang/ref/Reference.java<br />@exception class-name description<br />The @exception tag is a synonym for <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">@throws</a>.<br />{@inheritDoc} <br />Inherits (copies) documentation from the "<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">nearest</a>" inheritable class or implementable interface into the current doc comment at this tag's location. This allows you to write more general comments higher up the inheritance tree, and to write around the copied text.<br />This tag is valid only in these places in a doc comment:<br />· In the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">main description</a> block of a method. In this case, the main description is copied from a class or interface up the hierarchy.<br />· In the text arguments of the @return, @param and @throws tags of a method. In this case, the tag text is copied from the corresponding tag up the hierarchy.<br />See <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">Automatic Copying of Method Comments</a> for a more precise description of how comments are found in the inheritance hierarchy. Note that if this tag is missing, the comment is or is not automatically inherited according to rules described in that section.<br />{@link package.class#member label}<br />Inserts an in-line link with visible text label that points to the documentation for the specified package, class or member <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">name</a> of a referenced class. This tag is valid in all doc comments: overview, package, class, interface, constructor, method and field, including the text portion of any tag (such as @return, @param and @deprecated).<br />This tag is very simliar to <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">@see</a> -- both require the same references and accept exactly the same syntax for <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">package.class#member</a> and label. The main difference is that {@link} generates an in-line link rather than placing the link in the "See Also" section. Also, the {@link} tag begins and ends with curly braces to separate it from the rest of the in-line text. If you need to use "}" inside the label, use the HTML entity notation }<br />There is no limit to the number of {@link} tags allowed in a sentence. You can use this tag in the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">main description</a> part of any documentation comment or in the text portion of any tag (such as @deprecated, @return or @param).<br />For example, here is a comment that refers to the getComponentAt(int, int) method: Use the {@link #getComponentAt(int, int) getComponentAt} method.<br />From this, the standard doclet would generate the following HTML (assuming it refers to another class in the same package): Use the <a href="Component.html#getComponentAt(int, int)">getComponentAt</a> method.<br />Which appears on the web page as: Use the getComponentAt method.<br />You can extend {@link} to link to classes not being documented by using the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">-link</a> option.<br />For more details, see <a href="http://java.sun.com/j2se/javadoc/writingdoccomments/index.html#{@link}">writing {@link} tags</a>.<br />{@linkplain package.class#member label}<br />Identical to {@link}, except the link's label is displayed in plain text than code font. Useful when the label is plain text. Example: Refer to {@linkplain add() the overridden method}.<br />This would display as:<br />Refer to the overridden method.<br />{@literal text}<br />Displays text without interpreting the text as HTML markup or nested javadoc tags. This enables you to use regular angle brackets (<>) instead of the HTML entities (< and >) in doc comments, such as in parameter types (<object>), inequalities (3 <>C}<br />displays unchanged in the generated HTML page in your browser, as:<br /> A<b>C<br />The noteworthy point is that the <b> is not interpreted as bold (and it is not in code font).<br />If you want the same functionality but with the text in code font, use <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">{@code}</a>.<br />@param parameter-name description<br />Adds a parameter with the specified parameter-name followed by the specified description to the "Parameters" section. When writing the doc comment, you may continue the description onto multiple lines. This tag is valid only in a doc comment for a method, constructor or class.<br />The parameter-name can be the name of a parameter in a method or constructor, or the name of a type parameter of a class, method or constructor. Use angle brackets around this parameter name to specify the use of a type parameter.<br />Example of a type parameter of a class: /** * @param <e> Type of element stored in a list */ public interface List<e> extends Collection<e> { }<br />Example of a type parameter of a method: /** * @param string the string to be converted * @param type the type to convert the string to * @param <t> the type of the element * @param <v> the value of the element */ <t,> V convert(String string, Class<t> type) { }<br />For more details, see <a href="http://java.sun.com/j2se/javadoc/writingdoccomments/index.html#@param">writing @param tags</a>.<br />@return description<br />Adds a "Returns" section with the description text. This text should describe the return type and permissible range of values. This tag is valid only in a doc comment for a method.<br />For more details, see <a href="http://java.sun.com/j2se/javadoc/writingdoccomments/index.html#@return">writing @return tags</a>.<br />@see reference<br />Adds a "See Also" heading with a link or text entry that points to reference. A doc comment may contain any number of @see tags, which are all grouped under the same heading. The @see tag has three variations; the third form below is the most common. This tag is valid in any doc comment: overview, package, class, interface, constructor, method or field. For inserting an in-line link within a sentence to a package, class or member, see <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">{@link}</a>.<br />@see "string"<br />Adds a text entry for string. No link is generated. The string is a book or other reference to information not available by URL. The Javadoc tool distinguishes this from the previous cases by looking for a double-quote (") as the first character. For example: @see "The Java Programming Language"<br />This generates text such as:<br />See Also:<br />"The Java Programming Language"<br />@see <a href="URL#value">label</a><br />Adds a link as defined by URL#value. The URL#value is a relative or absolute URL. The Javadoc tool distinguishes this from other cases by looking for a less-than symbol (<) as the first character. For example: @see <a href="spec.html#section">Java Spec</a><br />This generates a link such as:<br />See Also:<br />Java Spec<br />@see package.class#member label<br />Adds a link, with visible text label, that points to the documentation for the specified <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">name</a> in the Java Language that is <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">referenced</a>. The label is optional; if omitted, the name appears instead as the visible text, suitably shortened -- see <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">How a name is displayed</a>. Use <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">-noqualifier</a> to globally remove the package name from this visible text. Use the label when you want the visible text to be different from the auto-generated visible text.<br />Only in version 1.2, just the name but not the label would automatically appear in <code> HTML tags, Starting with 1.2.2, the <code> is always included around the visible text, whether or not a label is used.<br />· package.class#member is any valid program element <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">name</a> that is <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">referenced</a> -- a package, class, interface, constructor, method or field name -- except that the character ahead of the member name should be a hash character (#). The class represents any top-level or nested class or interface. The member represents any constructor, method or field (not a nested class or interface). If this name is in the documented classes, the Javadoc tool will automatically create a link to it. To create links to <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">external referenced classes</a>, use the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">-link</a> option. Use either of the other two @see forms for referring to documentation of a name that does not belong to a referenced class. This argument is described at greater length below under <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">Specifying a Name</a>.<br />· label is optional text that is visible as the link's label. The label can contain whitespace. If label is omitted, then package.class.member will appear, suitably shortened relative to the current class and package -- see <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">How a name is displayed</a>.<br />· A space is the delimiter between package.class#member and label. A space inside parentheses does not indicate the start of a label, so spaces may be used between parameters in a method.<br />Example - In this example, an @see tag (in the Character class) refers to the equals method in the String class. The tag includes both arguments: the name "String#equals(Object)" and the label "equals". /** * @see String#equals(Object) equals */<br />The standard doclet produces HTML something like this: <dl><dt><b>See Also:</b><dd><a href="../../java/lang/String#equals(java.lang.Object)"><code>equals<code></a></dl><br />Which looks something like this in a browser, where the label is the visible link text:<br />See Also:<br />equals<br />Specifying a name - This package.class#member name can be either fully-qualified, such as java.lang.String#toUpperCase() or not, such as String#toUpperCase() or #toUpperCase(). If less than fully-qualified, the Javadoc tool uses the normal Java compiler search order to find it, further described below in <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">Search order for @see</a>. The name can contain whitespace within parentheses, such as between method arguments.<br />Of course the advantage of providing shorter, "partially-qualified" names is that they are shorter to type and there is less clutter in the source code. The following table shows the different forms of the name, where Class can be a class or interface, Type can be a class, interface, array, or primitive, and method can be a method or constructor.<br />Typical forms for @see package.class#member<br />Referencing a member of the current class@see #field@see #method(Type, Type,...)@see #method(Type argname, Type argname,...)@see #constructor(Type, Type,...)@see #constructor(Type argname, Type argname,...)Referencing another class in the current or imported packages@see Class#field@see Class#method(Type, Type,...)@see Class#method(Type argname, Type argname,...)@see Class#constructor(Type, Type,...)@see Class#constructor(Type argname, Type argname,...)@see Class.NestedClass@see ClassReferencing an element in another package (fully qualified)@see package.Class#field@see package.Class#method(Type, Type,...)@see package.Class#method(Type argname, Type argname,...)@see package.Class#constructor(Type, Type,...)@see package.Class#constructor(Type argname, Type argname,...)@see package.Class.NestedClass@see package.Class@see package<br /><br /><br />The following notes apply to the above table:<br />o The first set of forms (with no class or package) will cause the Javadoc tool to search only through the current class's hierarchy. It will find a member of the current class or interface, one of its superclasses or superinterfaces, or one of its enclosing classes or interfaces (<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">search steps 1-3</a>). It will not search the rest of the current package or other packages (search steps 4-5).<br />o If any method or constructor is entered as a name with no parentheses, such as getValue, and if there is no field with the same name, the Javadoc tool will correctly create a link to it, but will print a warning message reminding you to add the parentheses and arguments. If this method is overloaded, the Javadoc tool will link to the first method its search encounters, which is unspecified.<br />o Nested classes must be specified as outer.inner, not simply inner, for all forms.<br />o As stated, the hash character (#), rather than a dot (.) separates a member from its class. This enables the Javadoc tool to resolve ambiguities, since the dot also separates classes, nested classes, packages, and subpackages. However, the Javadoc tool is generally lenient and will properly parse a dot if you know there is no ambiguity, though it will print a warning.<br />Search order for @see - the Javadoc tool will process a @see tag that appears in a source file (.java), package file (package.html or package-info.java) or overview file (overview.html). In the latter two files, you must fully-qualify the name you supply with @see. In a source file, you can specify a name that is fully-qualified or partially-qualified.<br />When the Javadoc tool encounters a @see tag in a .java file that is not fully qualified, it searches for the specified name in the same order as the Java compiler would (except the Javadoc tool will not detect certain namespace ambiguities, since it assumes the source code is free of these errors). This search order is formally defined in Chapter 6, "Names" of the Java Language Specification, Second Edition. The Javadoc tool searches for that name through all related and imported classes and packages. In particular, it searches in this order:<br />1. the current class or interface<br />2. any enclosing classes and interfaces, searching closest first<br />3. any superclasses and superinterfaces, searching closest first<br />4. the current package<br />5. any imported packages, classes and interfaces, searching in the order of the import statement<br />The Javadoc tool continues to search recursively through steps 1-3 for each class it encounters until it finds a match. That is, after it searches through the current class and its enclosing class E, it will search through E's superclasses before E's enclosing classes. In steps 4 and 5, the Javadoc tool does not search classes or interfaces within a package in any specified order (that order depends on the particular compiler). In step 5, the Javadoc tool looks in java.lang, since that is automatically imported by all programs.<br />The Javadoc tool does not necessarily look in subclasses, nor will it look in other packages even if their documentation is being generated in the same run. For example, if the @see tag is in the java.awt.event.KeyEvent class and refers to a name in the java.awt package, javadoc does not look in that package unless that class imports it.<br />How a name is displayed - If label is omitted, then package.class.member appears. In general, it is suitably shortened relative to the current class and package. By "shortened", we mean the Javadoc tool displays only the minimum name necessary. For example, if the String.toUpperCase() method contains references to a member of the same class and to a member of a different class, the class name is displayed only in the latter case, as shown in the following table.<br />Use <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">-noqualifier</a> to globally remove the package names.<br />Type of Reference<br />Example in String.toUpperCase()<br />Displays As<br />@see tag refers to member of the same class, same package<br />@see String#toLowerCase()<br />toLowerCase() (omits the package and class names)<br />@see tag refers to member of a different class, same package<br />@see Character#toLowerCase(char)<br />Character.toLowerCase(char) (omits the package name, includes the class name)<br />@see tag refers to member of a different class, different package<br />@see java.io.File#exists()<br />java.io.File.exists() (includes the package and class names)<br />Examples of @seeThe comment to the right shows how the name would be displayed if the @see tag is in a class in another package, such as java.applet.Applet. See also: @see java.lang.String // String @see java.lang.String The String class // The String class @see String // String @see String#equals(Object) // String.equals(Object) @see String#equals // String.equals(java.lang.Object) @see java.lang.Object#wait(long) // java.lang.Object.wait(long) @see Character#MAX_RADIX // Character.MAX_RADIX @see <a href="spec.html">Java Spec</a> // Java Spec @see "The Java Programming Language" // "The Java Programming Language" <br />You can extend @see to link to classes not being documented by using the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">-link</a> option.<br />For more details, see <a href="http://java.sun.com/j2se/javadoc/writingdoccomments/index.html#@see">writing @see tags</a>.<br />@serial field-description include exclude<br />Used in the doc comment for a default serializable field.<br />An optional field-description should explain the meaning of the field and list the acceptable values. If needed, the description can span multiple lines. The standard doclet adds this information to the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">serialized form page</a>.<br />If a serializable field was added to a class some time after the class was made serializable, a statement should be added to its <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">main description</a> to identify at which version it was added.<br />The include and exclude arguments identify whether a class or package should be included or excluded from the serialized form page. They work as follows:<br />· A public or protected class that implements Serializable is included unless that class (or its package) is marked @serial exclude.<br />· A private or package-private class that implements Serializable is excluded unless that class (or its package) is marked @serial include.<br />Examples: The javax.swing package is marked @serial exclude (in package.html or package-info.java). The public class java.security.BasicPermission is marked @serial exclude. The package-private class java.util.PropertyPermissionCollection is marked @serial include.<br />The tag @serial at a class level overrides @serial at a package level.<br />For more information about how to use these tags, along with an example, see "<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsguideserializationspecserial-arch.html">Documenting Serializable Fields and Data for a Class</a>," Section 1.6 of the Java Object Serialization Specification. Also see the <a href="http://java.sun.com/products/jdk/serialization/faq/#javadoc_warn_missing">Serialization FAQ</a>, which covers common questions, such as "Why do I see javadoc warnings stating that I am missing @serial tags for private fields if I am not running javadoc with the -private switch?". Also see <a href="http://java.sun.com/j2se/javadoc/writingapispecs/serialized-criteria.html">Sun's criteria</a> for including classes in the serialized form specification.<br />@serialField field-name field-type field-description<br />Documents an ObjectStreamField component of a Serializable class's serialPersistentFields member. One @serialField tag should be used for each ObjectStreamField component.<br />@serialData data-description<br />The data-description documents the types and order of data in the serialized form. Specifically, this data includes the optional data written by the writeObject method and all data (including base classes) written by the Externalizable.writeExternal method.<br />The @serialData tag can be used in the doc comment for the writeObject, readObject, writeExternal, readExternal, writeReplace, and readResolve methods.<br />@since since-text<br />Adds a "Since" heading with the specified since-text to the generated documentation. The text has no special internal structure. This tag is valid in any doc comment: overview, package, class, interface, constructor, method or field. This tag means that this change or feature has existed since the software release specified by the since-text. For example: @since 1.5<br />For source code in the Java platform, this tag indicates the version of the Java platform API specification (not necessarily when it was added to the reference implementation). Multiple @since tags are allowed and are treated like multiple <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">@author</a> tags. You could use multiple tags if the prgram element is used by more than one API.<br />@throws class-name description<br />The @throws and @exception tags are synonyms. Adds a "Throws" subheading to the generated documentation, with the class-name and description text. The class-name is the name of the exception that may be thrown by the method. This tag is valid only in the doc comment for a method or constructor. If this class is not fully-specified, the Javadoc tool uses the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">search order</a> to look up this class. Multiple @throws tags can be used in a given doc comment for the same or different exceptions.<br />To ensure that all checked exceptions are documented, if a @throws tag does not exist for an exception in the throws clause, the Javadoc tool automatically adds that exception to the HTML output (with no description) as if it were documented with @throws tag.<br />The @throws documentation is copied from an overridden method to a subclass only when the exception is explicitly declared in the overridden method. The same is true for copying from an interface method to an implementing method. You can use <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">{@inheritDoc}</a> to force @throws to inherit documentation.<br />For more details, see <a href="http://java.sun.com/j2se/javadoc/writingdoccomments/index.html#@exception">writing @throws tags</a>.<br />{@value package.class#field}<br />When {@value} is used (without any argument) in the doc comment of a static field, it displays the value of that constant: /** * The value of this constant is {@value}. */ public static final String SCRIPT_START = "<script>"<br />When used with argument package.class#field in any doc comment, it displays the value of the specified constant: /** * Evaluates the script starting with {@value #SCRIPT_START}. */ public String evalScript(String script) { }<br />The argument package.class#field takes a form identical to that of the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">@see argument</a>, except that the member must be a static field.<br />These values of these constants are also displayed on the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapiconstant-values.html">Constant Field Values</a> page.<br />@version version-text<br />Adds a "Version" subheading with the specified version-text to the generated docs when the -version option is used. This tag is intended to hold the current version number of the software that this code is part of (as opposed to <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">@since</a>, which holds the version number where this code was introduced). The version-text has no special internal structure. To see where the version tag can be used, see <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">Where Tags Can Be Used</a>.<br />A doc comment may contain multiple @version tags. If it makes sense, you can specify one version number per @version tag or multiple version numbers per tag. In the former case, the Javadoc tool inserts a comma (,) and space between names. In the latter case, the entire text is simply copied to the generated document without being parsed. Therefore, you can use multiple names per line if you want a localized name separator other than comma.<br />For more details, see <a href="http://java.sun.com/j2se/javadoc/writingdoccomments/index.html#@version">writing @version tags</a>.<br />Where Tags Can Be Used<br />The following sections describe where the tags can be used. Note that these tags can be used in all doc comments: @see, @since, @deprecated, {@link}, {@linkplain}, and {@docroot}.<br /><br />Overview Documentation Tags<br />Overview tags are tags that can appear in the documentation comment for the overview page (which resides in the source file typically named overview.html). Like in any other documentation comments, these tags must appear after the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">main description</a>.<br />NOTE - The {@link} tag has a bug in overview documents in version 1.2 -- the text appears properly but has no link. The {@docRoot} tag does not currently work in overview documents.<br />Overview Tags<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">@see</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">@since</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">@author</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">@version</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">{@link}</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">{@linkplain}</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">{@docRoot}</a><br /><br />Package Documentation Tags<br />Package tags are tags that can appear in the documentation comment for a package (which resides in the source file named package.html or package-info.java). The @serial tag can only be used here with the include or exclude argument.<br />Package Tags<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">@see</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">@since</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">@serial</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">@author</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">@version</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">{@link}</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">{@linkplain}</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">{@docRoot}</a><br /><br />Class and Interface Documentation Tags<br />The following are tags that can appear in the documentation comment for a class or interface. The @serial tag can only be used here with the include or exclude argument.<br />Class/Interface Tags<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">@see</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">@since</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">@deprecated</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">@serial</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">@author</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">@version</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">{@link}</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">{@linkplain}</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">{@docRoot}</a><br />An example of a class comment:/** * A class representing a window on the screen. * For example: * <pre> * Window win = new Window(parent); * win.show(); * </pre> * * @author Sami Shaio * @version %I%, %G% * @see java.awt.BaseWindow * @see java.awt.Button */class Window extends BaseWindow { ...}<br /><br />Field Documentation Tags<br />The following are the tags that can appear in the documentation comment for a field.<br />Field Tags<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">@see</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">@since</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">@deprecated</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">@serial</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">@serialField</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">{@link}</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">{@linkplain}</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">{@docRoot}</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">{@value}</a><br />An example of a field comment: /** * The X-coordinate of the component. * * @see #getLocation() */ int x = 1263732;<br /><br />Constructor and Method Documentation Tags<br />The following are the tags that can appear in the documentation comment for a constructor or method, except for @return, which cannot appear in a constructor, and {@inheritDoc}, which has <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">certain restrictions</a>. The @serialData tag can only be used in the doc comment for <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">certain serialization methods</a>.<br />Method/Constructor Tags<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">@see</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">@since</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">@deprecated</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">@param</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">@return</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">@throws</a> and <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">@exception</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">@serialData</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">{@link}</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">{@linkplain}</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">{@inheritDoc}</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">{@docRoot}</a><br />An example of a method doc comment: /** * Returns the character at the specified index. An index * ranges from <code>0</code> to <code>length() - 1</code>. * * @param index the index of the desired character. * @return the desired character. * @exception StringIndexOutOfRangeException * if the index is not in the range <code>0</code> * to <code>length()-1</code>. * @see java.lang.Character#charValue() */ public char charAt(int index) { ... }<br />OPTIONS<br />The javadoc tool uses <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">doclets</a> to determine its output. The Javadoc tool uses the default standard doclet unless a custom doclet is specified with the -doclet option. The Javadoc tool provides a set of command-line options that can be used with any doclet -- these options are described below under the sub-heading <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">Javadoc Options</a>. The standard doclet provides an additional set of command-line options that are described below under the sub-heading <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">Options Provided by the Standard Doclet</a>. All option names are case-insensitive, though their arguments can be case-sensitive.<br />The options are:<br />-<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">1.1</a>-<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">author</a>-<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">bootclasspath</a>-<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">bottom</a>-<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">breakiterator</a>-<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">charset</a>-<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">classpath</a>-<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">d</a>-<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">docencoding</a>-<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">docfilessubdirs</a>-<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">doclet</a>-<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">docletpath</a>-<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">doctitle</a>-<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">encoding</a>-<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">exclude</a>-<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">excludedocfilessubdir</a>-<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">extdirs</a>-<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">footer</a>-<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">group</a><br />-<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">header</a>-<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">help</a>-<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">helpfile</a>-<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">J</a>-<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">keywords</a>-<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">link</a>-<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">linkoffline</a>-<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">linksource</a>-<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">locale</a>-<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">nocomment</a>-<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">nodeprecated</a>-<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">nodeprecatedlist</a>-<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">nohelp</a>-<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">noindex </a>-<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">nonavbar</a>-<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">noqualifier</a>-<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">nosince</a>-<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">notimestamp</a>-<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">notree </a>-<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">overview</a>-<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">package</a><br />-<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">private</a>-<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">protected</a>-<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">public</a>-<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">quiet</a>-<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">serialwarn</a>-<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">source</a>-<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">sourcepath</a>-<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">splitindex</a>-<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">stylesheetfile</a>-<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">subpackages</a>-<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">tag</a>-<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">taglet</a>-<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">tagletpath</a>-<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">title</a>-<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">use</a>-<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">verbose</a>-<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">version</a>-<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">windowtitle</a><br />Options shown in italic are the Javadoc core options, which are provided by the front end of the Javadoc tool and are available to all doclets. The standard doclet itself provides the non-italic options.<br />Javadoc Options<br />-overview path\filename<br />Specifies that javadoc should retrieve the text for the overview documentation from the "source" file specified by path/filename and place it on the Overview page (overview-summary.html). The path/filename is relative to the -sourcepath.<br />While you can use any name you want for filename and place it anywhere you want for path, a typical thing to do is to name it overview.html and place it in the source tree at the directory that contains the topmost package directories. In this location, no path is needed when documenting packages, since -sourcepath will point to this file. For example, if the source tree for the java.lang package is C:\src\classes\java\lang\, then you could place the overview file at C:\src\classes\overview.html. See <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">Real World Example</a>.<br />For information about the file specified by path/filename, see <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">overview comment file</a>.<br />Note that the overview page is created only if you pass into javadoc two or more package names. For further explanation, see <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">HTML Frames</a>.)<br />The title on the overview page is set by <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">-doctitle</a>.<br />-public<br />Shows only public classes and members.<br />-protected<br />Shows only protected and public classes and members. This is the default.<br />-package<br />Shows only package, protected, and public classes and members.<br />-private<br />Shows all classes and members.<br />-help<br />Displays the online help, which lists these javadoc and doclet command line options.<br />-doclet class<br />Specifies the class file that starts the doclet used in generating the documentation. Use the fully-qualified name. This doclet defines the content and formats the output. If the -doclet option is not used, javadoc uses the standard doclet for generating the default HTML format. This class must contain the start(Root) method. The path to this starting class is defined by the -docletpath option.<br />For example, to call the MIF doclet, use: -doclet com.sun.tools.doclets.mif.MIFDoclet<br />For full, working examples of running a particular doclet, see <a href="http://java.sun.com/j2se/javadoc/mifdoclet/docs/mifdoclet.html#runningmifdoclet">Running the MIF Doclet</a>.<br />-docletpath classpathlist<br />Specifies the path to the doclet starting class file (specified with the -doclet option) and any jar files it depends on. If the starting class file is in a jar file, then this specifies the path to that jar file, as shown in the example below. You can specify an absolute path or a path relative to the current directory. If classpathlist contains multiple paths or jar files, they should be separated with a colon (:) on Solaris and a semi-colon (;) on Windows. This option is not necessary if the doclet starting class is already in the search path.<br />Example of path to jar file that contains the starting doclet class file. Notice the jar filename is included. -docletpath C:\user\mifdoclet\lib\mifdoclet.jar<br />Example of path to starting doclet class file. Notice the class filename is omitted. -docletpath C:\user\mifdoclet\classes\com\sun\tools\doclets\mif\<br />For full, working examples of running a particular doclet, see <a href="http://java.sun.com/j2se/javadoc/mifdoclet/docs/mifdoclet.html#runningmifdoclet">Running the MIF Doclet</a>.<br />-1.1<br />This feature has been removed from Javadoc 1.4. There is no replacement for it. This option created documentation with the appearance and functionality of documentation generated by Javadoc 1.1 (it never supported nested classes). If you need this option, use Javadoc 1.2 or 1.3 instead.<br />-source release<br />Specifies the version of source code accepted. The following values for release are allowed:<br />1.5<br />javadoc accepts code containing generics and other language features introduced in JDK 1.5. The compiler defaults to the 1.5 behavior if the -source flag is not used.<br />1.4<br />javadoc accepts code containing assertions, which were introduced in JDK 1.4.<br />1.3<br />javadoc does not support assertions, generics, or other language features introduced after JDK 1.3.<br />Use the value of release corresponding to that used when compiling the code with javac.<br />-sourcepath sourcepathlist<br />Specifies the search paths for finding source files (.java) when passing package names or -subpackages into the javadoc command. The sourcepathlist can contain multiple paths by separating them with a semicolon (;). The Javadoc tool will search in all subdirectories of the specified paths. Note that this option is not only used to locate the source files being documented, but also to find source files that are not being documented but whose comments are inherited by the source files being documented.<br />Note that you can use the -sourcepath option only when passing package names into the javadoc command -- it will not locate .java files passed into the javadoc command. (To locate .java files, cd to that directory or include the path ahead of each file, as shown at <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">Documenting One or More Classes</a>.) If -sourcepath is omitted, javadoc uses the class path to find the source files (see -<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">classpath</a>). Therefore, the default -sourcepath is the value of class path. If -classpath is omitted and you are passing package names into javadoc, it looks in the current directory (and subdirectories) for the source files.<br />Set sourcepathlist to the root directory of the source tree for the package you are documenting. For example, suppose you want to document a package called com.mypackage whose source files are located at: C:\user\src\com\mypackage\*.java<br />In this case you would specify the sourcepath to C:\user\src, the directory that contains com\mypackage, and then supply the package name com.mypackage: C:> javadoc -sourcepath C:\user\src com.mypackage<br />This is easy to remember by noticing that if you concatenate the value of sourcepath and the package name together and change the dot to a backslash "\", you end up with the full path to the package: C:\user\src\com\mypackage.<br />To point to two source paths: C:> javadoc -sourcepath C:\user1\src;C:\user2\src com.mypackage<br />-classpath classpathlist<br />Specifies the paths where javadoc will look for <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">referenced classes</a> (.class files) -- these are the documented classes plus any classes referenced by those classes. The classpathlist can contain multiple paths by separating them with a semicolon (;). The Javadoc tool will search in all subdirectories of the specified paths. Follow the instructions in <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindowsclasspath.html">class path</a> documentation for specifying classpathlist.<br />If -sourcepath is omitted, the Javadoc tool uses -classpath to find the source files as well as class files (for backward compatibility). Therefore, if you want to search for source and class files in separate paths, use both -sourcepath and -classpath.<br />For example, if you want to document com.mypackage, whose source files reside in the directory C:\user\src\com\mypackage, and if this package relies on a library in C:\user\lib, you would specify: C:> javadoc -classpath \user\lib -sourcepath \user\src com.mypackage<br />As with other tools, if you do not specify -classpath, the Javadoc tool uses the CLASSPATH environment variable, if it is set. If both are not set, the Javadoc tool searches for classes from the current directory.<br />For an in-depth description of how the Javadoc tool uses -classpath to find user classes as it relates to extension classes and bootstrap classes, see <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocsfindingclasses.html">How Classes Are Found</a>.<br />-subpackages package1:package2:...<br />Generates documentation from source files in the specified packages and recursively in their subpackages. This option is useful when adding new subpackages to the source code, as they are automatically included. Each package argument is any top-level subpackage (such as java) or fully qualified package (such as javax.swing) that does not need to contain source files. Arguments are separated by colons (on all operating systmes). Wildcards are not needed or allowed. Use <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">-sourcepath</a> to specify where to find the packages. This option is smart about not processing source files that are in the source tree but do not belong to the packages, as described at <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">processing of source files</a>.<br />For example: C:> javadoc -d docs -sourcepath C:\user\src -subpackages java:javax.swing<br />This command generates documentation for packages named "java" and "javax.swing" and all their subpackages.<br />You can use -subpackages in conjunction with <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">-exclude</a> to exclude specific packages.<br />-exclude packagename1:packagename2:...<br />Unconditionally excludes the specified packages and their subpackages from the list formed by <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">-subpackages</a>. It excludes those packages even if they would otherwise be included by some previous or later -subpackages option. For example: C:> javadoc -sourcepath C:\user\src -subpackages java -exclude java.net:java.lang<br />would include java.io, java.util, and java.math (among others), but would exclude packages rooted at java.net and java.lang. Notice this excludes java.lang.ref, a subpackage of java.lang).<br />-bootclasspath classpathlist<br />Specifies the paths where the boot classes reside. These are nominally the Java platform classes. The bootclasspath is part of the search path the Javadoc tool will use to look up source and class files. See <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocsfindingclasses.html#srcfiles">How Classes Are Found</a>. for more details. Separate directories in classpathlist with semicolons (;).<br />-extdirs dirlist<br />Specifies the directories where extension classes reside. These are any classes that use the Java Extension mechanism. The extdirs is part of the search path the Javadoc tool will use to look up source and class files. See -classpath (above) for more details. Separate directories in dirlist with semicolons (;).<br />-verbose<br />Provides more detailed messages while javadoc is running. Without the verbose option, messages appear for loading the source files, generating the documentation (one message per source file), and sorting. The verbose option causes the printing of additional messages specifying the number of milliseconds to parse each java source file.<br />-quiet<br />Shuts off non-error and non-warning messages, leaving only the warnings and errors appear, making them easier to view. Also suppresses the version string.<br />-breakiterator <br />Uses the internationalized sentence boundary of <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavatextBreakIterator.html">java.text.BreakIterator</a> to determine the end of the first sentence for English (all other locales already use BreakIterator), rather than an English language, locale-specific algorithm. By first sentence, we mean the first sentence in the main description of a package, class or member. This sentence is copied to the package, class or member summary, and to the alphabetic index.<br />From JDK 1.2 forward, the BreakIterator class is already used to determine the end of sentence for all languages but English. Therefore, the -breakiterator option has no effect except for English from 1.2 forward. English has its own default algorithm:<br />· English default sentence-break algorithm - Stops at a period followed by a space or a HTML block tag, such as <p>.<br />· Breakiterator sentence-break algorithm - In general, stops at a period, question mark or exclamation mark followed by a space if the next word starts with a capital letter. This is meant to handle most abbreviations (such as "The serial no. is valid", but won't handle "Mr. Smith"). Doesn't stop at HTML tags or sentences that begin with numbers or symbols. Stops at the last period in "../filename", even if embedded in an HTML tag.<br />NOTE: We have removed from 1.5.0 the breakiterator warning messages that were in 1.4.x and have left the default sentence-break algorithm unchanged. That is, the -breakiterator option is not the default in 1.5.0, nor do we expect it to become the default. This is a reversal from our former intention that the default would change in the "next major release" (1.5.0). This means if you have not modified your source code to eliminate the breakiterator warnings in 1.4.x, then you don't have to do anything, and the warnings go away starting with 1.5.0. The reason for this reversal is because any benefit to having breakiterator become the default would be outweighed by the incompatible source change it would require. We regret any extra work and confusion this has caused.<br />-locale language_country_variant<br />Important - The -locale option must be placed ahead (to the left) of any <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">options provided by the standard doclet</a> or any other doclet. Otherwise, the navigation bars will appear in English. This is the only command-line option that is order-dependent.<br />Specifies the locale that javadoc uses when generating documentation. The argument is the name of the locale, as described in java.util.Locale documentation, such as en_US (English, United States) or en_US_WIN (Windows variant).<br />Specifying a locale causes javadoc to choose the resource files of that locale for messages (strings in the navigation bar, headings for lists and tables, help file contents, comments in stylesheet.css, and so forth). It also specifies the sorting order for lists sorted alphabetically, and the sentence separator to determine the end of the first sentence. It does not determine the locale of the doc comment text specified in the source files of the documented classes.<br />-encoding name<br />Specifies the encoding name of the source files, such as EUCJIS/SJIS. If this option is not specified, the platform default converter is used.<br />Also see <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">-docencoding</a> and <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">-charset</a>.<br />-Jflag<br />Passes flag directly to the runtime system <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindowsjava.html#options">java</a> that runs javadoc. Notice there must be no space between the J and the flag. For example, if you need to ensure that the system sets aside 32 megabytes of memory in which to process the generated documentation, then you would call the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindowsjava.html#Xms">-Xmx</a> option of java as follows (-Xms is optional, as it only sets the size of initial memory, which is useful if you know the minimum amount of memory required): C:> javadoc -J-Xmx32m -J-Xms32m com.mypackage<br />To tell what version of javadoc you are using, call the "-version" option of java: C:> javadoc -J-version java version "1.2" Classic VM (build JDK-1.2-V, green threads, sunwjit)<br />(The version number of the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">standard doclet</a> appears in its output stream.)<br />Options Provided by the Standard Doclet<br />-d directory<br />Specifies the destination directory where javadoc saves the generated HTML files. (The "d" means "destination.") Omitting this option causes the files to be saved to the current directory. The value directory can be absolute, or relative to the current working directory. As of 1.4, the destination directory is automatically created when javadoc is run.<br />For example, the following generates the documentation for the package com.mypackage and saves the results in the C:\user\doc\ directory: C:> javadoc -d \user\doc com.mypackage<br />-use<br />Includes one "Use" page for each documented class and package. The page describes what packages, classes, methods, constructors and fields use any API of the given class or package. Given class C, things that use class C would include subclasses of C, fields declared as C, methods that return C, and methods and constructors with parameters of type C.<br />For example, let's look at what might appear on the "Use" page for String. The getName() method in the java.awt.Font class returns type String. Therefore, getName() uses String, and you will find that method on the "Use" page for String.<br />Note that this documents only uses of the API, not the implementation. If a method uses String in its implementation but does not take a string as an argument or return a string, that is not considered a "use" of String.<br />You can access the generated "Use" page by first going to the class or package, then clicking on the "Use" link in the navigation bar.<br />-version<br />Includes the @version text in the generated docs. This text is omitted by default. To tell what version of the Javadoc tool you are using, use the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">-J-version</a> option.<br />-author<br />Includes the @author text in the generated docs.<br />-splitindex<br />Splits the index file into multiple files, alphabetically, one file per letter, plus a file for any index entries that start with non-alphabetical characters.<br />-windowtitle title<br />Specifies the title to be placed in the HTML <title> tag. This appears in the window title and in any browser bookmarks (favorite places) that someone creates for this page. This title should not contain any HTML tags, as the browser will not properly interpret them. Any internal quotation marks within title may have to be escaped. If -windowtitle is omitted, the Javadoc tool uses the value of -doctitle for this option. C:> javadoc -windowtitle "Java 2 Platform" com.mypackage<br />-doctitle title<br />Specifies the title to be placed near the top of the overview summary file. The title will be placed as a centered, level-one heading directly beneath the upper navigation bar. The title may contain html tags and white space, though if it does, it must be enclosed in quotes. Any internal quotation marks within title may have to be escaped. C:> javadoc -doctitle "Java<sup><span style="font-size:\;">TM</span></sup>" com.mypackage<br />-title title<br />This option no longer exists. It existed only in Beta versions of Javadoc 1.2. It has been renamed to <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">-doctitle</a>. This option is being renamed to make it clear that it defines the document title rather than the window title.<br />-header header<br />Specifies the header text to be placed at the top of each output file. The header will be placed to the right of the upper navigation bar. header may contain HTML tags and white space, though if it does, it must be enclosed in quotes. Any internal quotation marks within header may have to be escaped. C:> javadoc -header "<b>Java 2 Platform </b><br />v1.4" com.mypackage<br />-footer footer<br />Specifies the footer text to be placed at the bottom of each output file. The footer will be placed to the right of the lower navigation bar. footer may contain html tags and white space, though if it does, it must be enclosed in quotes. Any internal quotation marks within footer may have to be escaped.<br />-bottom text<br />Specifies the text to be placed at the bottom of each output file. The text will be placed at the bottom of the page, below the lower navigation bar. The text may contain HTML tags and white space, though if it does, it must be enclosed in quotes. Any internal quotation marks within text may have to be escaped.<br />-link extdocURL<br />Creates links to existing javadoc-generated documentation of <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">external referenced classes</a>. It takes one argument:<br />· extdocURL is the absolute or relative URL of the directory containing the external javadoc-generated documentation you want to link to. <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">Examples</a> are shown below. The <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">package-list</a> file must be found in this directory (otherwise, use <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">-linkoffline</a>). The Javadoc tool reads the package names from the package-list file and then links to those packages at that URL. When the Javadoc tool is run, the extdocURL value is copied literally into the <a> links that are created. Therefore, extdocURL must be the URL to the directory, not to a file.<br />You can use an absolute link for extdocURL to enable your docs to link to a document on any website, or can use a relative link to link only to a relative location. If relative, the value you pass in should be the relative path from the destination directory (specified with -d) to the directory containing the packages being linked to.<br />When specifying an absolute link you normally use an http: link. However, if you want to link to a file system that has no web server, you can use a file: link -- however, do this only if everyone wanting to access the generated documentation shares the same file system.<br />In all cases, and on all operating systems, you should use a forward slash as the separator, whether the URL is absolute or relative, and "http:" or "file:" based (as specified in the <a href="http://www.ietf.org/rfc/rfc1738.txt">URL Memo</a>).<br />Absolute http: based link:<br />-link http://<host>/<directory>/<directory>/.../<name><br />Absolute file: based link:<br />-link file://<host>/<directory>/<directory>/.../<name><br />Relative link:<br />-link <directory>/<directory>/.../<name><br />You can specify <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">multiple</a> -link options in a given javadoc run to link to multiple documents.<br />Choosing between -linkoffline and -link: Use -link:<br />· when using a relative path to the external API document, or<br />· when using an absolute URL to the external API document, if your shell allows a program to open a connection to that URL for reading.<br />Use <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">-linkoffline</a>:<br />· when using an absolute URL to the external API document, if your shell does not allow a program to open a connection to that URL for reading. This can occur if you are behind a firewall and the document you want to link to is on the other side.<br />Example using absolute links to the external docs - Let's say you want to link to the java.lang, java.io and other Java 2 Platform packages at <a href="http://java.sun.com/j2se/1.5.0/docs/api">http://java.sun.com/j2se/1.5.0/docs/api</a>, The following command generates documentation for the package com.mypackage with links to the Java 2 Platform packages. The generated documentation will contain links to the Object class, for example, in the class trees. (Other options, such as -sourcepath and -d, are not shown.) C:> javadoc -link http://java.sun.com/j2se/1.5.0/docs/api com.mypackage<br />Example using relative links to the external docs - Let's say you have two packages whose docs are generated in different runs of the Javadoc tool, and those docs are separated by a relative path. In this example, the packages are com.apipackage, an API, and com.spipackage, an SPI (Service Provide Interface). You want the documentation to reside in docs/api/com/apipackage and docs/spi/com/spipackage. Assuming the API package documentation is already generated, and that docs is the current directory, you would document the SPI package with links to the API documentation by running: C:> javadoc -d ./spi -link ../api com.spipackage<br />Notice the -link argument is relative to the destination directory (docs/spi).<br />Details - The -link option enables you to link to classes referenced to by your code but not documented in the current javadoc run. For these links to go to valid pages, you must know where those HTML pages are located, and specify that location with extdocURL. This allows, for instance, third party documentation to link to java.* documentation on http://java.sun.com.<br />Omit the -link option for javadoc to create links only to API within the documentation it is generating in the current run. (Without the -link option, the Javadoc tool does not create links to documentation for external references, because it does not know if or where that documentation exists.)<br />This option can create links in <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">several places</a> in the generated documentation.<br />Another use is for <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">cross-links</a> between sets of packages: Execute javadoc on one set of packages, then run javadoc again on another set of packages, creating links both ways between both sets.<br />How a Class Must be Referenced - For a link to an external referenced class to actually appear (and not just its text label), the class must be referenced in the following way. It is not sufficient for it to be referenced in the body of a method. It must be referenced in either an import statement or in a declaration. Here are examples of how the class java.io.File can be referenced:<br />· In any kind of import statement: by wildcard import, import explicitly by name, or automatically import for java.lang.*. For example, this would suffice:import java.io.*;In 1.3.x and 1.2.x, only an explicit import by name works -- a wildcard import statement does not work, nor does the automatic import java.lang.*.<br />· In a declaration:void foo(File f) {}The reference and be in the return type or parameter type of a method, constructor, field, class or interface, or in an implements, extends or throws statement.<br />An important corollary is that when you use the -link option, there may be many links that unintentionally do not appear due to this constraint. (The text would appear without a hypertext link.) You can detect these by the warnings they emit. The most innocuous way to properly reference a class and thereby add the link would be to import that class, as shown above.<br />Package List - The -link option requires that a file named package-list, which is generated by the Javadoc tool, exist at the URL you specify with -link. The package-list file is a simple text file that lists the names of packages documented at that location. In the earlier <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">example</a>, the Javadoc tool looks for a file named package-list at the given URL, reads in the package names and then links to those packages at that URL.<br />For example, the package list for the Java 2 Platform 5.0 API is located at <a href="http://java.sun.com/j2se/1.5.0/docs/api/package-list">http://java.sun.com/j2se/1.5.0/docs/api/package-list</a>. and starts out as follows: java.applet java.awt java.awt.color java.awt.datatransfer java.awt.dnd java.awt.event java.awt.font etc.<br />When javadoc is run without the -link option, when it encounters a name that belongs to an <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">external referenced class</a>, it prints the name with no link. However, when the -link option is used, the Javadoc tool searches the package-list file at the specified extdocURL location for that package name. If it finds the package name, it prefixes the name with extdocURL.<br />In order for there to be no broken links, all of the documentation for the external references must exist at the specified URLs. The Javadoc tool will not check that these pages exist -- only that the package-list exists.<br />Multiple Links - You can supply multiple -link options to link to any number of external generated documents. Javadoc 1.2 has a known bug which prevents you from supplying more than one -link command. This was fixed in 1.2.2.<br />Specify a different link option for each external document to link to:<br /> C:> javadoc -link extdocURL1 -link extdocURL2 ... -link extdocURLn com.mypackage<br />where extdocURL1, extdocURL2, ... extdocURLn point respectively to the roots of external documents, each of which contains a file named package-list.<br />Cross-links - Note that "bootstrapping" may be required when cross-linking two or more documents that have not previously been generated. In other words, if package-list does not exist for either document, when you run the Javadoc tool on the first document, the package-list will not yet exist for the second document. Therefore, to create the external links, you must re-generate the first document after generating the second document.<br />In this case, the purpose of first generating a document is to create its package-list (or you can create it by hand it if you're certain of the package names). Then generate the second document with its external links. The Javadoc tool prints a warning if a needed external package-list file does not exist.<br />-linkoffline extdocURL packagelistLoc<br />This option is a variation of -link; they both create links to javadoc-generated documentation for <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">external referenced classes</a>. Use the -linkoffline option when linking to a document on the web when the Javadoc tool itself is "offline" -- that is, it cannot access the document through a web connection.<br />More specifically, use -linkoffline if the external document's package-list file is not accessible or does not exist at the extdocURL location but does exist at a different location, which can be specified by packageListLoc (typically local). Thus, if extdocURL is accessible only on the World Wide Web, -linkoffline removes the constraint that the Javadoc tool have a web connection when generating the documentation.<br />Another use is as a "hack" to <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">update docs</a>: After you have run javadoc on a full set of packages, then you can run javadoc again on onlya smaller set of changed packages, so that the updated files can be inserted back into the original set. Examples are given below.<br />The -linkoffline option takes two arguments -- the first for the string to be embedded in the <a> links, the second telling it where to find package-list:<br />· extdocURL is the absolute or relative URL of the directory containing the external javadoc-generated documentation you want to link to. If relative, the value should be the relative path from the destination directory (specified with -d) to the root of the packages being linked to. For more details, see <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">extdocURL</a> in the -link option.<br />· packagelistLoc is the path or URL to the directory containing the package-list file for the external documentation. This can be a URL (http: or file:) or file path, and can be absolute or relative. If relative, make it relative to the current directory from where javadoc was run. Do not include the package-list filename.<br />You can specify <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">multiple</a> -linkoffline options in a given javadoc run. (Prior to 1.2.2, it could be specified only once.)<br />Example using absolute links to the external docs - Let's say you want to link to the java.lang, java.io and other Java 2 Platform packages at http://java.sun.com/j2se/1.5.0/docs/api, but your shell does not have web access. You could open the package-list file in a browser at <a href="http://java.sun.com/j2se/1.5.0/docs/api/package-list">http://java.sun.com/j2se/1.5.0/docs/api/package-list</a>, save it to a local directory, and point to this local copy with the second argument, packagelistLoc. In this example, the package list file has been saved to the current directory "." . The following command generates documentation for the package com.mypackage with links to the Java 2 Platform packages. The generated documentation will contain links to the Object class, for example, in the class trees. (Other necessary options, such as -sourcepath, are not shown.) C:> javadoc -linkoffline http://java.sun.com/j2se/1.5.0/docs/api . com.mypackage<br />Example using relative links to the external docs - It's not very common to use -linkoffline with relative paths, for the simple reason that -link usually suffices. When using -linkoffline, the package-list file is generally local, and when using relative links, the file you are linking to is also generally local. So it is usually unnecessary to give a different path for the two arguments to -linkoffline. When the two arguments are identical, you can use -link. See <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">the -link relative example</a>.<br />Manually Creating a package-list File - If a package-list file does not yet exist, but you know what package names your document will link to, you can create your own copy of this file by hand and specify its path with packagelistLoc. An example would be the previous case where the package list for com.spipackage did not exist when com.apipackage was first generated. This technique is useful when you need to generate documentation that links to new external documentation whose package names you know, but which is not yet published. This is also a way of creating package-list files for packages generated with Javadoc 1.0 or 1.1, where package-list files were not generated. Likewise, two companies can share their unpublished package-list files, enabling them to release their cross-linked documentation simultaneously.<br />Linking to Multiple Documents - You can include -linkoffline once for each generated document you want to refer to (each option is shown on a separate line for clarity):<br />C:> javadoc -linkoffline extdocURL1 packagelistLoc1 \ -linkoffline extdocURL2 packagelistLoc2 \ ...<br />Updating docs - Another use for -linkoffline option is useful if your project has dozens or hundreds of packages, if you have already run javadoc on the entire tree, and now, in a separate run, you want to quickly make some small changes and re-run javadoc on just a small portion of the source tree. This is somewhat of a hack in that it works properly only if your changes are only to doc comments and not to declarations. If you were to add, remove or change any declarations from the source code, then broken links could show up in the index, package tree, inherited member lists, use page, and other places.<br />First, you create a new destination directory (call it update) for this new small run. Let's say the original destination directory was named html. In the simplest example, cd to the parent of html. Set the first argument of -linkoffline to the current directory "." and set the second argument to the relative path to html, where it can find package-list, and pass in only the package names of the packages you want to update: C:> javadoc -d update -linkoffline . html com.mypackage<br />When the Javadoc tool is done, copy these generated class pages in update\com\package (not the overview or index), over the original files in html\com\package.<br />-linksource <br />Creates an HTML version of each source file (with line numbers) and adds links to them from the standard HTML documentation. Links are created for classes, interfaces, constructors, methods and fields whose declarations are in a source file. Otherwise, links are not created, such as for default constructors and generated classes.<br />This option exposes all private implementation details in the included source files, including private classes, private fields, and the bodies of private methods, regardless of the -public, -package, -protected and -private options. Unless you also use the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">-private</a> option, not all private classes or interfaces will necessarily be accessible via links.<br />Each link appears on the name of the identifier in its declaration. For example, the link to the source code of the Button class would be on the word "Button": public class Button extends Component implements Accessible<br />and the link to the source code of the getLabel() method in the Button class would be on the word "getLabel": public String getLabel()<br />-group groupheading packagepattern:packagepattern:...<br />Separates packages on the overview page into whatever groups you specify, one group per table. You specify each group with a different -group option. The groups appear on the page in the order specified on the command line; packages are alphabetized within a group. For a given -group option, the packages matching the list of packagepattern expressions appear in a table with the heading groupheading.<br />· groupheading can be any text, and can include white space. This text is placed in the table heading for the group.<br />· packagepattern can be any package name, or can be the start of any package name followed by an asterisk (*). The asterisk is a wildcard meaning "match any characters". This is the only wildcard allowed. Multiple patterns can be included in a group by separating them with colons (:).<br />NOTE: If using an asterisk in a pattern or pattern list, the pattern list must be inside quotes, such as "java.lang*:java.util"<br />If you do not supply any -group option, all packages are placed in one group with the heading "Packages". If the all groups do not include all documented packages, any leftover packages appear in a separate group with the heading "Other Packages".<br />For example, the following option separates the four documented packages into core, extension and other packages. Notice the trailing "dot" does not appear in "java.lang*" -- including the dot, such as "java.lang.*" would omit the java.lang package. C:> javadoc -group "Core Packages" "java.lang*:java.util" -group "Extension Packages" "javax.*" java.lang java.lang.reflect java.util javax.servlet java.new<br />This results in the groupings:<br />Core Packages<br />java.lang<br />java.lang.reflect<br />java.util<br />Extension Packages<br />javax.servlet<br />Other Packages<br />java.new<br />-nodeprecated<br />Prevents the generation of any deprecated API at all in the documentation. This does what -nodeprecatedlist does, plus it does not generate any deprecated API throughout the rest of the documentation. This is useful when writing code and you don't want to be distracted by the deprecated code.<br />-nodeprecatedlist<br />Prevents the generation of the file containing the list of deprecated APIs (deprecated-list.html) and the link in the navigation bar to that page. (However, javadoc continues to generate the deprecated API throughout the rest of the document.) This is useful if your source code contains no deprecated API, and you want to make the navigation bar cleaner.<br />-nosince<br />Omits from the generated docs the "Since" sections associated with the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">@since</a> tags.<br />-notree<br />Omits the class/interface hierarchy pages from the generated docs. These are the pages you reach using the "Tree" button in the navigation bar. The hierarchy is produced by default.<br />-noindex<br />Omits the index from the generated docs. The index is produced by default.<br />-nohelp<br />Omits the HELP link in the navigation bars at the top and bottom of each page of output.<br />-nonavbar<br />Prevents the generation of the navigation bar, header and footer, otherwise found at the top and bottom of the generated pages. Has no affect on the "bottom" option. The -nonavbar option is useful when you are interested only in the content and have no need for navigation, such as converting the files to PostScript or PDF for print only.<br />-helpfile path\filename<br />Specifies the path of an alternate help file path\filename that the HELP link in the top and bottom navigation bars link to. Without this option, the Javadoc tool automatically creates a help file help-doc.html that is hard-coded in the Javadoc tool. This option enables you to override this default. The filename can be any name and is not restricted to help-doc.html -- the Javadoc tool will adjust the links in the navigation bar accordingly. For example: C:> javadoc -helpfile C:\user\myhelp.html java.awt<br />-stylesheetfile path\filename<br />Specifies the path of an alternate HTML stylesheet file. Without this option, the Javadoc tool automatically creates a stylesheet file stylesheet.css that is hard-coded in the Javadoc tool. This option enables you to override this default. The filename can be any name and is not restricted to stylesheet.css. For example: C:> javadoc -stylesheetfile C:\user\mystylesheet.css com.mypackage<br />-serialwarn<br />Generates compile-time warnings for missing @serial tags. By default, Javadoc 1.2.2 (and later versions) generates no serial warnings. (This is a reversal from earlier versions.) Use this option to display the serial warnings, which helps to properly document default serializable fields and writeExternal methods.<br />-charset name<br />Specifies the HTML character set for this document. The name should be a preferred MIME name as given in the <a href="http://www.iana.org/assignments/character-sets">IANA Registry</a>. For example: C:> javadoc -charset "iso-8859-1" mypackage<br />would insert the following line in the head of every generated page: <meta equiv="Content-Type" content="text/html; charset=ISO-8859-1"><br />This META tag is described in the <a href="http://www.w3.org/TR/REC-html40/charset.html#h-5.2.2">HTML standard</a>. (4197265 and 4137321)<br />Also see <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">-encoding</a> and <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">-docencoding</a>.<br />-docencoding name<br />Specifies the encoding of the generated HTML files. The name should be a preferred MIME name as given in the <a href="http://www.iana.org/assignments/character-sets">IANA Registry</a>. If you omit this option but use <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">-encoding</a>, then the encoding of the generated HTML files is determined by -encoding. Example: % javadoc -docencoding "ISO-8859-1" mypackage<br />Also see <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">-encoding</a> and <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">-charset</a>.<br />-keywords<br />Adds HTML meta keyword tags to the generated file for each class. These tags can help the page be found by search engines that look for meta tags. (Most search engines that search the entire Internet do not look at meta tags, because pages can misuse them; but search engines offered by companies that confine their search to their own website can benefit by looking at meta tags.)<br />The meta tags include the fully qualified name of the class and the unqualified names of the fields and methods. Constructors are not included because they are identical to the class name. For example, the class String starts with these keywords: <meta name="keywords" content="java.lang.String class"> <meta name="keywords" content="CASE_INSENSITIVE_ORDER"> <meta name="keywords" content="length()"> <meta name="keywords" content="charAt()"><br />-tag tagname:Xaoptcmf:"taghead"<br />Enables the Javadoc tool to interpret a simple, one-argument custom <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">block</a> tag @tagname in doc comments. So the Javadoc tool can "<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">spell-check</a>" tag names, it is important to include a -tag option for every custom tag that is present in the source code, <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">disabling</a> (with X) those that are not being output in the current run.<br />The colon (:) is always the separator. To use a colon in tagname, see <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">Use of Colon in Tag Name</a>.<br />The -tag option outputs the tag's heading taghead in bold, followed on the next line by the text from its single argument, as shown in the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">example</a> below. Like any block tag, this argument's text can contain inline tags, which are also interpreted. The output is similar to standard one-argument tags, such as @return and @author. Omitting taghead causes tagname to appear as the heading.<br />Placement of tags - The Xaoptcmf part of the argument determines where in the source code the tag is allowed to be placed, and whether the tag can be disabled (using X). You can supply either a, to allow the tag in all places, or any combination of the other letters:<br />X (<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">disable tag</a>)a (all)o (overview)p (packages)t (types, that is classes and interfaces)c (constructors)m (methods)f (fields)<br />Examples of single tags - An example of a tag option for a tag that that can be used anywhere in the source code is: -tag todo:a:"To Do:"<br />If you wanted @todo to be used only with constructors, methods and fields, you would use: -tag todo:cmf:"To Do:"<br />Notice the last colon (:) above is not a parameter separator, but is part of the heading text (as shown below). You would use either tag option for source code that contains the tag @todo, such as: @todo The documentation for this method needs work.<br />This line would produce output something like:<br />To Do:<br />The documentation for this method needs work.<br />Use of Colon in Tag Name - A colon can be used in a tag name if it is escaped with a backslash. For this doc comment: /** * @ejb:bean */<br />use this tag option: -tag ejb\:bean:a:"EJB Bean:"<br />Spell-checking tag names (Disabling tags) - Some developers put custom tags in the source code that they don't always want to output. In these cases, it is important to list all tags that are present in the source code, enabling the ones you want to output and disabling the ones you don't want to output. The presence of X disables the tag, while its absence enables the tag. This gives the Javadoc tool enough information to know if a tag it encounters is unknown, probably the results of a typo or a misspelling. It prints a warning in these cases.<br />You can add X to the placement values already present, so that when you want to enable the tag, you can simply delete the X. For example, if @todo is a tag that you want to suppress on output, you would use: -tag todo:Xcmf:"To Do:"<br />or, if you'd rather keep it simple: -tag todo:X<br />The syntax -tag todo:X works even if @todo is defined by a taglet.<br />Order of tags - The order of the -tag (and <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">-taglet</a>) options determine the order the tags are output. You can mix the custom tags with the standard tags to intersperse them. The tag options for standard tags are placeholders only for determining the order -- they take only the standard tag's name. (Subheadings for standard tags cannot be altered.) This is illustrated in the following example.<br />If -tag is missing, then the position of -taglet determines its order. If they are both present, then whichever appears last on the command line determines its order. (This happens because the tags and taglets are processed in the order that they appear on the command line. For example, if -taglet and -tag both have the name "todo", the one that appears last on the command line will determine its order.<br />Example of a complete set of tags - This example inserts "To Do" after "Parameters" and before "Throws" in the output. By using "X", it also specifies that @example is a tag that might be encountered in the source code that should not be output during this run. Notice that if you use <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">@argfile</a>, you can put the tags on separate lines in an argument file like this (no line continuation characters needed): -tag param -tag return -tag todo:a:"To Do:" -tag throws -tag see -tag example:X<br />When javadoc parses the doc comments, any tag encountered that is neither a standard tag nor passed in with -tag or -taglet is considered unknown, and a warning is thrown.<br />The standard tags are initially stored internally in a list in their default order. Whenever -tag options are used, those tags get appended to this list -- standard tags are moved from their default position. Therefore, if a -tag option is omitted for a standard tag, it remains in its default position.<br />Avoiding Conflicts - If you want to slice out your own namespace, you can use a dot-separated naming convention similar to that used for packages: com.mycompany.todo. Sun will continue to create standard tags whose names do not contain dots. Any tag you create will override the behavior of a tag by the same name defined by Sun. In other words, if you create a tag or taglet @todo, it will always have the same behavior you define, even if Sun later creates a standard tag of the same name.<br />Annotations vs. Javadoc Tags - In general, if the markup you want to add is intended to affect or produce documentation, it should probably be a javadoc tag; otherwise, it should be an annotation. See <a href="http://java.sun.com/j2se/javadoc/writingdoccomments/index.html#annotations">Comparing Annotations and Javadoc Tags</a><br />You can also create more complex block tags, or custom inline tags with the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">-taglet</a> option.<br />-taglet class<br />Specifies the class file that starts the taglet used in generating the documentation for that tag. Use the fully-qualified name for class. This taglet also defines the number of text arguments that the custom tag has. The taglet accepts those arguments, processes them, and generates the output. For extensive documentation with example taglets, see:<br />· <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsguidejavadoctagletoverview.html">Taglet Overview</a><br />Taglets are useful for block or inline tags. They can have any number of arguments and implement custom behavior, such as making text bold, formatting bullets, writing out the text to a file, or starting other processes.<br />Taglets can only determine where a tag should appear and in what form. All other decisions are made by the doclet. So a taglet cannot do things such as remove a class name from the list of included classes. However, it can execute side effects, such as printing the tag's text to a file or triggering another process.<br />Use the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">-tagletpath</a> option to specify the path to the taglet. Here is an example that inserts the "To Do" taglet after "Parameters" and ahead of "Throws" in the generated pages: -taglet com.sun.tools.doclets.ToDoTaglet -tagletpath /home/taglets -tag return -tag param -tag todo -tag throws -tag see<br />Alternatively, you can use the -taglet option in place of its -tag option, but that may be harder to read.<br />-tagletpath tagletpathlist<br />Specifies the search paths for finding <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">taglet</a> class files (.class). The tagletpathlist can contain multiple paths by separating them with a colon (:). The Javadoc tool will search in all subdirectories of the specified paths.<br />-docfilessubdirs <br />Enables deep copying of "doc-files" directories. In other words, subdirectories and all contents are recursively copied to the destination. For example, the directory doc-files/example/images and all its contents would now be copied. There is also an option to <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">exclude subdirectories</a>.<br />-excludedocfilessubdir name1:name2...<br />Excludes any "doc-files" subdirectories with the given names. This prevents the copying of SCCS and other source-code-control subdirectories.<br />-noqualifier all packagename1:packagename2:...<br />Omits qualifying package name from ahead of class names in output. The argument to -noqualifier is either "all" (all package qualifiers are omitted) or a colon-separate list of packages, with wildcards, to be removed as qualifiers. The package name is removed from places where <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">class or interface names appear</a>.<br />The following example omits all package qualifiers: -noqualifier all<br />The following example omits "java.lang" and "java.io" package qualifiers: -noqualifier java.lang:java.io<br />The following example omits package qualifiers starting with "java", and "com.sun" subpackages (but not "javax"): -noqualifier java.*:com.sun.*<br />Where a package qualifier would appear due to the above behavior, the name can be suitably shortened -- see <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">How a name is displayed</a>. This rule is in effect whether or not -noqualifier is used.<br />-notimestamp <br />Suppresses the timestamp, which is hidden in an HTML comment in the generated HTML near the top of each page. Useful when you want to run javadoc on two source bases and diff them, as it prevents timestamps from causing a diff (which would otherwise be a diff on every page). The timestamp includes the javadoc version number, and currently looks like this: <!-- Generated by javadoc (build 1.5.0-internal) on Tue Jun 22 09:57:24 PDT 2004 --><br />-nocomment <br />Suppress the entire comment body, including the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">main description</a> and all tags, generating only declarations. This option enables re-using source files originally intended for a different purpose, to produce skeleton HTML documentation at the early stages of a new project.<br />COMMAND LINE ARGUMENT FILES<br />To shorten or simplify the javadoc command line, you can specify one or more files that themselves contain arguments to the javadoc command (except -J options). This enables you to create javadoc commands of any length on any operating system.<br />An argument file can include Javadoc options, source filenames and package names in any combination, or just arguments to Javadoc options. The arguments within a file can be space-separated or newline-separated. Filenames within an argument file are relative to the current directory, not the location of the argument file. Wildcards (*) are not allowed in these lists (such as for specifying *.java). Use of the '@' character to recursively interpret files is not supported. The -J options are not supported because they are passed to the launcher, which does not support argument files.<br />When executing javadoc, pass in the path and name of each argument file with the '@' leading character. When javadoc encounters an argument beginning with the character `@', it expands the contents of that file into the argument list.<br />Example - Single Arg File<br />You could use a single argument file named "argfile" to hold all Javadoc arguments: C:> javadoc @argfile<br />This argument file could contain the contents of both files shown in the next example.<br />Example - Two Arg Files<br />You can create two argument files -- one for the Javadoc options and the other for the package names or source filenames: (Notice the following lists have no line-continuation characters.)<br />Create a file named "options" containing: -d docs-filelist -use -splitindex -windowtitle 'Java 2 Platform v1.3 API Specification' -doctitle 'Java<sup><span style="font-size:-2;">TM</span></sup> 2 Platform 5.0 API Specification' -header '<b>Java 2 Platform </b><br /><span style="font-size:-1;">5.0</span>' -bottom 'Copyright 1993-2000 Sun Microsystems, Inc. All Rights Reserved.' -group "Core Packages" "java.*" -overview \java\pubs\ws\1.5\src\share\classes\overview-core.html -sourcepath \java\pubs\ws\1.5\src\share\classes<br />Create a file named "packages" containing: com.mypackage1 com.mypackage2 com.mypackage3<br />You would then run javadoc with: C:> javadoc @options @packages<br />Example - Arg Files with Paths<br />The argument files can have paths, but any filenames inside the files are relative to the current working directory (not path1 or path2): C:> javadoc @path1\options @path2\packages<br />Example - Option Arguments<br />Here's an example of saving just an argument to a javadoc option in an argument file. We'll use the -bottom option, since it can have a lengthy argument. You could create a file named "bottom" containing its text argument: '<span style="font-size:-1;"><a href="http://java.sun.com/cgi-bin/bugreport.cgi">Submit a bug or feature</a><br /><br />Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.<br />Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road,<br />Palo Alto, California, 94303, U.S.A. All Rights Reserved.</span>'<br />Then run the Javadoc tool with: C:> javadoc -bottom @bottom @packages<br />Or you could include the -bottom option at the start of the argument file, and then just run it as: C:> javadoc @bottom @packages<br />Running<br />RUNNING JAVADOC<br />Version Numbers - The version number of javadoc can be determined using <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">javadoc -J-version</a>. The version number of the standard doclet appears in its output stream. It can be turned off with -quiet.<br />Public programmatic interface - To invoke the Javadoc tool from within programs written in the Java language. This interface is in com.sun.tools.javadoc.Main (and javadoc is re-entrant). For more details, see <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsguidejavadocstandard-doclet.html#runningprogrammatically">Standard Doclet</a>.<br />Running Doclets - The instructions given below are for invoking the standard HTML doclet. To invoke a custom doclet, use the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">-doclet</a> and <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">-docletpath</a> options. For full, working examples of running a particular doclet, see <a href="http://java.sun.com/j2se/javadoc/mifdoclet/docs/mifdoclet.html#runningmifdoclet">Running the MIF Doclet</a>.<br />SIMPLE EXAMPLES<br />You can run javadoc on entire packages or individual source files. Each package name has a corresponding directory name. In the following examples, the source files are located at C:\home\src\java\awt\*java. The destination directory is C:\home\html.<br />Documenting One or More Packages<br />To document a package, the source files (*.java) for that package must be located in a directory having the same name as the package. If a package name is made up of several identifiers (separated by dots, such as java.awt.color), each subsequent identifier must correspond to a deeper subdirectory (such as java/awt/color). You may split the source files for a single package among two such directory trees located at different places, as long as -sourcepath points to them both -- for example src1\java\awt\color and src2\java\awt\color.<br />You can run javadoc either by changing directories (with cd) or by using -sourcepath option. The examples below illustrate both alternatives.<br />· Case 1 - Run recursively starting from one or more packages - This example uses -sourcepath so javadoc can be run from any directory and -subpackages (a new 1.4 option) for recursion. It traverses the subpackages of the java directory excluding packages rooted at java.net and java.lang. Notice this excludes java.lang.ref, a subpackage of java.lang). · % javadoc <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">-d</a> \home\html <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">-sourcepath</a> \home\src <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">-subpackages</a> java <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">-exclude</a> java.net:java.lang<br />To also traverse down other package trees, append their names to the -subpackages argument, such as java:javax:org.xml.sax.<br />· Case 2 - Run on explicit packages after changing to the "root" source directory - Change to the parent directory of the fully-qualified package. Then run javadoc, supplying names of one or more packages you want to document: · C:> cd C:\home\src\· C:> javadoc -d C:\home\html java.awt java.awt.event<br />· Case 3 - Run from any directory on explicit packages in a single directory tree - In this case, it doesn't matter what the current directory is. Run javadoc supplying -sourcepath with the parent directory of the top-level package, and supplying names of one or more packages you want to document: · C:> javadoc -d C:\home\html -sourcepath C:\home\src java.awt java.awt.event<br />· Case 4 - Run from any directory on explicit packages in multiple directory trees - This is the same as case 3, but for packages in separate directory trees. Run javadoc supplying -sourcepath with the path to each tree's root (colon-separated) and supply names of one or more packages you want to document. All source files for a given package do not need to be located under a single root directory -- they just need to be found somewhere along the sourcepath. · C:> javadoc -d C:\home\html -sourcepath C:\home\src1;C:\home\src2 java.awt java.awt.event<br />Result: All cases generate HTML-formatted documentation for the public and protected classes and interfaces in packages java.awt and java.awt.event and save the HTML files in the specified destination directory (C:\home\html). Because two or more packages are being generated, the document has three HTML frames -- for the list of packages, the list of classes, and the main class pages.<br />Documenting One or More Classes<br />The second way to run the Javadoc tool is by passing in one or more source files (.java). You can run javadoc either of the following two ways -- by changing directories (with cd) or by fully-specifying the path to the .java files. Relative paths are relative to the current directory. The -sourcepath option is ignored when passing in source files. You can use command line wildcards, such as asterisk (*), to specify groups of classes.<br />· Case 1 - Changing to the source directory - Change to the directory holding the .java files. Then run javadoc, supplying names of one or more source files you want to document. · C:> cd C:\home\src\java\awt· C:> javadoc -d C:\home\html Button.java Canvas.java Graphics*.java<br />This example generates HTML-formatted documentation for the classes Button, Canvas and classes beginning with Graphics. Because source files rather than package names were passed in as arguments to javadoc, the document has two frames -- for the list of classes and the main page.<br />· Case 2 - Changing to the package root directory - This is useful for documenting individual source files from different subpackages off the same root. Change to the package root directory, and supply the source files with paths from the root. · C:> cd C:\home\src· C:> javadoc -d \home\html java\awt\Button.java java\applet\Applet.java<br />This example generates HTML-formatted documentation for the classes Button and Applet.<br />· Case 3 - From any directory - In this case, it doesn't matter what the current directory is. Run javadoc supplying the absolute path (or path relative to the current directory) to the .java files you want to document. · C:> javadoc -d C:\home\html C:\home\src\java\awt\Button.java C:\home\src\java\awt\Graphics*.java<br />This example generates HTML-formatted documentation for the class Button and classes beginning with Graphics.<br />Documenting Both Packages and Classes<br />You can document entire packages and individual classes at the same time. Here's an example that mixes two of the previous examples. You can use -sourcepath for the path to the packages but not for the path to the individual classes. C:> javadoc -d C:\home\html -sourcepath C:\home\src java.awt C:\home\src\java\applet\Applet.java<br />This example generates HTML-formatted documentation for the package java.awt and class Applet. (The Javadoc tool determines the package name for Applet from the package declaration, if any, in the Applet.java source file.)<br />REAL WORLD EXAMPLE<br />The Javadoc tool has many useful options, some of which are more commonly used than others. Here is effectively the command we use to run the Javadoc tool on the Java platform API. We use 180MB of memory to generate the documentation for the 1500 (approx.) public and protected classes in the Java 2 Platform, Standard Edition, v1.2.<br />The same example is shown twice -- first as executed on the command line, then as executed from a makefile. It uses absolute paths in the option arguments, which enables the same javadoc command to be run from any directory.<br />Command Line Example<br />This command line example is over 900 characters, which is too long for some shells, such as DOS. You can use a <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">command line argument file</a> (or write a shell script) to workaround this limitation. C:> javadoc -sourcepath \java\jdk\src\share\classes ^ -overview \java\jdk\src\share\classes\overview.html ^ -d \java\jdk\build\api ^ -use ^ -splitIndex ^ -windowtitle 'Java 2 Platform 5.0 API Specification' ^ -doctitle 'Java<sup><span style="font-size:-2;">TM</span></sup> 2 Platform 5.0 API Specification' ^ -header '<b>Java 2 Platform </b><br /><span style="font-size:-1;">5.0</span>' ^ -bottom '<span style="font-size:-1;"><a href="http://java.sun.com/cgi-bin/bugreport.cgi">Submit a bug or feature</a><br /><br />Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.<br />Copyright 1993-1999 Sun Microsystems, Inc. 901 San Antonio Road,<br />Palo Alto, California, 94303, U.S.A. All Rights Reserved.</span>' ^ -group "Core Packages" "java.*:com.sun.java.*:org.omg.*" ^ -group "Extension Packages" "javax.*" ^ -J-Xmx180m ^ @packages<br />where packages is the name of a file containing the packages to process, such as java.applet java.lang. None of the options should contain any newline characters between the single quotes. (For example, if you copy and paste this example, delete the newline characters from the -bottom option.) See the other notes listed below.<br />Makefile Example<br />This is an example of a GNU makefile. For an example of a Windows makefile, see <a href="http://java.sun.com/j2se/javadoc/faq/index.html#makefiles">creating a makefile for Windows</a>. javadoc -<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">sourcepath</a> $(SRCDIR) ^ /* Sets path for source files */ -<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">overview</a> $(SRCDIR)\overview.html ^ /* Sets file for overview text */ -<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">d</a> \java\jdk\build\api ^ /* Sets destination directory */ -<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">use</a> ^ /* Adds "Use" files */ -<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">splitIndex</a> ^ /* Splits index A-Z */ -<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">windowtitle</a> $(WINDOWTITLE) ^ /* Adds a window title */ -<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">doctitle</a> $(DOCTITLE) ^ /* Adds a doc title */ -<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">header</a> $(HEADER) ^ /* Adds running header text */ -<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">bottom</a> $(BOTTOM) ^ /* Adds text at bottom */ -<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">group</a> $(GROUPCORE) ^ /* 1st subhead on overview page */ -<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">group</a> $(GROUPEXT) ^ /* 2nd subhead on overview page */ -<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">J</a>-Xmx180m ^ /* Sets memory to 180MB */ java.lang java.lang.reflect ^ /* Sets packages to document */ java.util java.io java.net ^ java.applet WINDOWTITLE = 'Java 2 Platform v1.2 API Specification'DOCTITLE = 'Java<sup><span style="font-size:-2;">TM</span></sup> 2 Platform v1.2 API Specification'HEADER = '<b>Java 2 Platform </b><br /><span style="font-size:-1;">v1.2</span>'BOTTOM = '<span style="font-size:-1;"><a href="http://java.sun.com/cgi-bin/bugreport.cgi">Submit a bug or feature</a><br /><br />Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.<br />Copyright 1993-1999 Sun Microsystems, Inc. 901 San Antonio Road,<br />Palo Alto, California, 94303, U.S.A. All Rights Reserved.</span>'GROUPCORE = '"Core Packages" "java.*:com.sun.java.*:org.omg.*"'GROUPEXT = '"Extension Packages" "javax.*"'SRCDIR = '/java/jdk/1.2/src/share/classes'<br />Single quotes are used to surround makefile arguments.<br />NOTES<br />· If you omit the -windowtitle option, the Javadoc tool copies the doc title to the window title. The -windowtitle text is basically the same as the -doctitle but without HTML tags, to prevent those tags from appearing as raw text in the window title.<br />· If you omit the -footer option, as done here, the Javadoc tool copies the header text to the footer.<br />· Other important options you might want to use but not needed in this example are -<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">classpath</a> and -<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">link</a>.<br />TROUBLESHOOTING<br />General Troubleshooting<br />· Javadoc FAQ - Commonly-encountered bugs and troubleshooting tips can be found on the <a href="http://java.sun.com/j2se/javadoc/faq/index.html#B">Javadoc FAQ</a><br />· Bugs and Limitations - You can also see some bugs listed at <a href="http://java.sun.com/j2se/1.5.0/fixedbugs/index.html">Important Bug Fixes and Changes</a>.<br />· Version number - See <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">version numbers</a>.<br />· Documents only legal classes - When documenting a package, javadoc only reads files whose names are composed of legal class names. You can prevent javadoc from parsing a file by including, for example, a hyphen "-" in its filename.<br />Errors and Warnings<br />Error and warning messages contain the filename and line number to the declaration line rather than to the particular line in the doc comment.<br />· "error: cannot read: Class1.java" the Javadoc tool is trying to load the class Class1.java in the current directory. The class name is shown with its path (absolute or relative), which in this case is the same as ./Class1.java.<br />Autoboxing<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsguidelanguageindex.html">Language Contents</a><br />As any Java programmer knows, you can’t put an int (or other primitive value) into a collection. Collections can only hold object references, so you have to box primitive values into the appropriate wrapper class (which is <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangInteger.html">Integer</a> in the case of int). When you take the object out of the collection, you get the Integer that you put in; if you need an int, you must unbox the Integer using the intValue method. All of this boxing and unboxing is a pain, and clutters up your code. The autoboxing and unboxing feature automates the process, eliminating the pain and the clutter.<br />The following example illustrates autoboxing and unboxing, along with <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsguidelanguagegenerics.html">generics</a> and the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsguidelanguageforeach.html">for-each</a> loop. In a mere ten lines of code, it computes and prints an alphabetized frequency table of the words appearing on the command line. import java.util.*; // Prints a frequency table of the words on the command linepublic class Frequency { public static void main(String[] args) { Map<string,> m = new TreeMap<string,>(); for (String word : args) { Integer freq = m.get(word); m.put(word, (freq == null ? 1 : freq + 1)); } System.out.println(m); }} java Frequency if it is to be it is up to me to do the watusi{be=1, do=1, if=1, is=2, it=2, me=1, the=1, to=3, up=1, watusi=1}<br />The program first declares a map from String to Integer, associating the number of times a word occurs on the command line with the word. Then it iterates over each word on the command line. For each word, it looks up the word in the map. Then it puts a revised entry for the word into the map. The line that does this (highlighted in green) contains both autoboxing and unboxing. To compute the new value to associate with the word, first it looks at the current value (freq). If it is null, this is the first occurrence of the word, so it puts 1 into the map. Otherwise, it adds 1 to the number of prior occurrences and puts that value into the map. But of course you cannot put an int into a map, nor can you add one to an Integer. What is really happening is this: In order to add 1 to freq, it is automatically unboxed, resulting in an expression of type int. Since both of the alternative expressions in the conditional expression are of type int, so too is the conditional expression itself. In order to put this int value into the map, it is automatically boxed into an Integer.<br />The result of all this magic is that you can largely ignore the distinction between int and Integer, with a few caveats. An Integer expression can have a null value. If your program tries to autounbox null, it will throw a NullPointerException. The == operator performs reference identity comparisons on Integer expressions and value equality comparisons on int expressions. Finally, there are performance costs associated with boxing and unboxing, even if it is done automatically.<br />Here is another sample program featuring autoboxing and unboxing. It is a static factory that takes an int array and returns a <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilList.html">List</a> of Integer backed by the array. In a mere ten lines of code this method provides the full richness of the List interface atop an int array. All changes to the list write through to the array and vice-versa. The lines that use autoboxing or unboxing are highlighted in green: // List adapter for primitive int arraypublic static List<integer> asList(final int[] a) { return new AbstractList<integer>() { public Integer get(int i) { return a[i]; } // Throws NullPointerException if val == null public Integer set(int i, Integer val) { Integer oldVal = a[i]; a[i] = val; return oldVal; } public int size() { return a.length; } };}<br />The performance of the resulting list is likely to be poor, as it boxes or unboxes on every get or set operation. It is plenty fast enough for occasional use, but it would be folly to use it in a performance critical inner loop.<br />So when should you use autoboxing and unboxing? Use them only when there is an “impedance mismatch” between reference types and primitives, for example, when you have to put numerical values into a collection. It is not appropriate to use autoboxing and unboxing for scientific computing, or other performance-sensitive numerical code. An Integer is not a substitute for an int; autoboxing and unboxing blur the distinction between primitive types and reference types, but they do not eliminate it.<br /><br />ENVIRONMENT<br />CLASSPATH<br />Environment variable that provides the path which javadoc uses to find user class files. This environment variable is overridden by the -classpath option. Separate directories with a semicolon, for example: .;C:\classes;C:\home\java\classes<br />java.lang Class Exception<a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html">java.lang.Object</a> <br /><br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangThrowable.html">java.lang.Throwable</a> <br /><br />java.lang.Exception<br />All Implemented Interfaces:<br /><a title="interface in java.io" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioSerializable.html">Serializable</a><br />Direct Known Subclasses:<br /><a title="class in java.security.acl" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavasecurityaclAclNotFoundException.html">AclNotFoundException</a>, <a title="class in java.rmi.activation" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavarmiactivationActivationException.html">ActivationException</a>, <a title="class in java.rmi" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavarmiAlreadyBoundException.html">AlreadyBoundException</a>, <a title="class in org.omg.CORBA.portable" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapiorgomgCORBAportableApplicationException.html">ApplicationException</a>, <a title="class in java.awt" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaawtAWTException.html">AWTException</a>, <a title="class in java.util.prefs" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilprefsBackingStoreException.html">BackingStoreException</a>, <a title="class in javax.management" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxmanagementBadAttributeValueExpException.html">BadAttributeValueExpException</a>, <a title="class in javax.management" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxmanagementBadBinaryOpValueExpException.html">BadBinaryOpValueExpException</a>, <a title="class in javax.swing.text" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxswingtextBadLocationException.html">BadLocationException</a>, <a title="class in javax.management" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxmanagementBadStringOperationException.html">BadStringOperationException</a>, <a title="class in java.util.concurrent" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilconcurrentBrokenBarrierException.html">BrokenBarrierException</a>, <a title="class in javax.security.cert" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxsecuritycertCertificateException.html">CertificateException</a>, <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangClassNotFoundException.html">ClassNotFoundException</a>, <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangCloneNotSupportedException.html">CloneNotSupportedException</a>, <a title="class in java.util.zip" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilzipDataFormatException.html">DataFormatException</a>, <a title="class in javax.xml.datatype" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxxmldatatypeDatatypeConfigurationException.html">DatatypeConfigurationException</a>, <a title="class in javax.security.auth" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxsecurityauthDestroyFailedException.html">DestroyFailedException</a>, <a title="class in java.util.concurrent" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilconcurrentExecutionException.html">ExecutionException</a>, <a title="class in javax.swing.tree" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxswingtreeExpandVetoException.html">ExpandVetoException</a>, <a title="class in java.awt" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaawtFontFormatException.html">FontFormatException</a>, <a title="class in java.security" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavasecurityGeneralSecurityException.html">GeneralSecurityException</a>, <a title="class in org.ietf.jgss" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapiorgietfjgssGSSException.html">GSSException</a>, <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangIllegalAccessException.html">IllegalAccessException</a>, <a title="class in java.lang.instrument" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalanginstrumentIllegalClassFormatException.html">IllegalClassFormatException</a>, <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangInstantiationException.html">InstantiationException</a>, <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangInterruptedException.html">InterruptedException</a>, <a title="class in java.beans" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavabeansIntrospectionException.html">IntrospectionException</a>, <a title="class in javax.management" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxmanagementInvalidApplicationException.html">InvalidApplicationException</a>, <a title="class in javax.sound.midi" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxsoundmidiInvalidMidiDataException.html">InvalidMidiDataException</a>, <a title="class in java.util.prefs" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilprefsInvalidPreferencesFormatException.html">InvalidPreferencesFormatException</a>, <a title="class in javax.management.modelmbean" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxmanagementmodelmbeanInvalidTargetObjectTypeException.html">InvalidTargetObjectTypeException</a>, <a title="class in java.lang.reflect" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangreflectInvocationTargetException.html">InvocationTargetException</a>, <a title="class in java.io" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioIOException.html">IOException</a>, <a title="class in javax.management" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxmanagementJMException.html">JMException</a>, <a title="class in java.security.acl" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavasecurityaclLastOwnerException.html">LastOwnerException</a>, <a title="class in javax.sound.sampled" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxsoundsampledLineUnavailableException.html">LineUnavailableException</a>, <a title="class in javax.sound.midi" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxsoundmidiMidiUnavailableException.html">MidiUnavailableException</a>, <a title="class in java.awt.datatransfer" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaawtdatatransferMimeTypeParseException.html">MimeTypeParseException</a>, <a title="class in javax.naming" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxnamingNamingException.html">NamingException</a>, <a title="class in java.awt.geom" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaawtgeomNoninvertibleTransformException.html">NoninvertibleTransformException</a>, <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangNoSuchFieldException.html">NoSuchFieldException</a>, <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangNoSuchMethodException.html">NoSuchMethodException</a>, <a title="class in java.rmi" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavarmiNotBoundException.html">NotBoundException</a>, <a title="class in java.security.acl" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavasecurityaclNotOwnerException.html">NotOwnerException</a>, <a title="class in java.text" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavatextParseException.html">ParseException</a>, <a title="class in javax.xml.parsers" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxxmlparsersParserConfigurationException.html">ParserConfigurationException</a>, <a title="class in java.awt.print" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaawtprintPrinterException.html">PrinterException</a>, <a title="class in javax.print" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxprintPrintException.html">PrintException</a>, <a title="class in java.security" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavasecurityPrivilegedActionException.html">PrivilegedActionException</a>, <a title="class in java.beans" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavabeansPropertyVetoException.html">PropertyVetoException</a>, <a title="class in javax.security.auth" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxsecurityauthRefreshFailedException.html">RefreshFailedException</a>, <a title="class in org.omg.CORBA.portable" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapiorgomgCORBAportableRemarshalException.html">RemarshalException</a>, <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangRuntimeException.html">RuntimeException</a>, <a title="class in org.xml.sax" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapiorgxmlsaxSAXException.html">SAXException</a>, <a title="class in java.rmi.server" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavarmiserverServerNotActiveException.html">ServerNotActiveException</a>, <a title="class in java.sql" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavasqlSQLException.html">SQLException</a>, <a title="class in java.util.concurrent" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilconcurrentTimeoutException.html">TimeoutException</a>, <a title="class in java.util" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilTooManyListenersException.html">TooManyListenersException</a>, <a title="class in javax.xml.transform" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxxmltransformTransformerException.html">TransformerException</a>, <a title="class in java.lang.instrument" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalanginstrumentUnmodifiableClassException.html">UnmodifiableClassException</a>, <a title="class in javax.sound.sampled" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxsoundsampledUnsupportedAudioFileException.html">UnsupportedAudioFileException</a>, <a title="class in javax.security.auth.callback" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxsecurityauthcallbackUnsupportedCallbackException.html">UnsupportedCallbackException</a>, <a title="class in java.awt.datatransfer" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaawtdatatransferUnsupportedFlavorException.html">UnsupportedFlavorException</a>, <a title="class in javax.swing" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxswingUnsupportedLookAndFeelException.html">UnsupportedLookAndFeelException</a>, <a title="class in java.net" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavanetURISyntaxException.html">URISyntaxException</a>, <a title="class in org.omg.CORBA" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapiorgomgCORBAUserException.html">UserException</a>, <a title="class in javax.transaction.xa" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxtransactionxaXAException.html">XAException</a>, <a title="class in javax.management.modelmbean" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxmanagementmodelmbeanXMLParseException.html">XMLParseException</a>, <a title="class in javax.xml.xpath" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxxmlxpathXPathException.html">XPathException</a><br />public class Exceptionextends <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangThrowable.html">Throwable</a><br />The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch.<br />Since:<br />JDK1.0<br />See Also:<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangError.html">Error</a>, <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapiserialized-form.html#java.lang.Exception">Serialized Form</a><br />Constructor Summary<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangException.html#Exception()">Exception</a>() Constructs a new exception with null as its detail message.<br /><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangException.html#Exception(java.lang.String)">Exception</a>(<a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> message) Constructs a new exception with the specified detail message.<br /><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangException.html#Exception(java.lang.String,">Exception</a>(<a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> message, <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangThrowable.html">Throwable</a> cause) Constructs a new exception with the specified detail message and cause.<br /><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangException.html#Exception(java.lang.Throwable)">Exception</a>(<a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangThrowable.html">Throwable</a> cause) Constructs a new exception with the specified cause and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause).<br /><br /> <br />Method Summary<br /> <br />Methods inherited from class java.lang.<a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangThrowable.html">Throwable</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangThrowable.html#fillInStackTrace()">fillInStackTrace</a>, <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangThrowable.html#getCause()">getCause</a>, <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangThrowable.html#getLocalizedMessage()">getLocalizedMessage</a>, <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangThrowable.html#getMessage()">getMessage</a>, <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangThrowable.html#getStackTrace()">getStackTrace</a>, <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangThrowable.html#initCause(java.lang.Throwable)">initCause</a>, <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangThrowable.html#printStackTrace()">printStackTrace</a>, <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangThrowable.html#printStackTrace(java.io.PrintStream)">printStackTrace</a>, <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangThrowable.html#printStackTrace(java.io.PrintWriter)">printStackTrace</a>, <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangThrowable.html#setStackTrace(java.lang.StackTraceElement[])">setStackTrace</a>, <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangThrowable.html#toString()">toString</a><br /> <br />Methods inherited from class java.lang.<a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html">Object</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html#clone()">clone</a>, <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html#equals(java.lang.Object)">equals</a>, <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html#finalize()">finalize</a>, <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html#getClass()">getClass</a>, <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html#hashCode()">hashCode</a>, <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html#notify()">notify</a>, <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html#notifyAll()">notifyAll</a>, <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html#wait()">wait</a>, <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html#wait(long)">wait</a>, <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html#wait(long,">wait</a><br /> <br />Constructor Detail<br />Exceptionpublic Exception()<br />Constructs a new exception with null as its detail message. The cause is not initialized, and may subsequently be initialized by a call to <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangThrowable.html#initCause(java.lang.Throwable)">Throwable.initCause(java.lang.Throwable)</a>.<br />Exceptionpublic Exception(<a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> message)<br />Constructs a new exception with the specified detail message. The cause is not initialized, and may subsequently be initialized by a call to <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangThrowable.html#initCause(java.lang.Throwable)">Throwable.initCause(java.lang.Throwable)</a>.<br />Parameters:<br />message - the detail message. The detail message is saved for later retrieval by the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangThrowable.html#getMessage()">Throwable.getMessage()</a> method.<br />Exceptionpublic Exception(<a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> message, <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangThrowable.html">Throwable</a> cause)<br />Constructs a new exception with the specified detail message and cause.<br />Note that the detail message associated with cause is not automatically incorporated in this exception's detail message.<br />Parameters:<br />message - the detail message (which is saved for later retrieval by the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangThrowable.html#getMessage()">Throwable.getMessage()</a> method).<br />cause - the cause (which is saved for later retrieval by the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangThrowable.html#getCause()">Throwable.getCause()</a> method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)<br />Since:<br />1.4<br />Exceptionpublic Exception(<a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangThrowable.html">Throwable</a> cause)<br />Constructs a new exception with the specified cause and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause). This constructor is useful for exceptions that are little more than wrappers for other throwables (for example, <a title="class in java.security" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavasecurityPrivilegedActionException.html">PrivilegedActionException</a>).<br />Parameters:<br />cause - the cause (which is saved for later retrieval by the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangThrowable.html#getCause()">Throwable.getCause()</a> method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)<br />Since:<br />1.4 <br />java.util Class Arrays<a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html">java.lang.Object</a> <br /><br />java.util.Arrays<br />public class Arraysextends <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html">Object</a><br />This class contains various methods for manipulating arrays (such as sorting and searching). This class also contains a static factory that allows arrays to be viewed as lists.<br />The methods in this class all throw a NullPointerException if the specified array reference is null, except where noted.<br />The documentation for the methods contained in this class includes briefs description of the implementations. Such descriptions should be regarded as implementation notes, rather than parts of the specification. Implementors should feel free to substitute other algorithms, so long as the specification itself is adhered to. (For example, the algorithm used by sort(Object[]) does not have to be a mergesort, but it does have to be stable.)<br />This class is a member of the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsguidecollectionsindex.html">Java Collections Framework</a>.<br />Since:<br />1.2<br />See Also:<br /><a title="interface in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangComparable.html">Comparable</a>, <a title="interface in java.util" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilComparator.html">Comparator</a><br />Method Summary<br />static<br /><t> <a title="interface in java.util" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilList.html">List</a><t><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#asList(T...)">asList</a>(T... a) Returns a fixed-size list backed by the specified array.<br />static int<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#binarySearch(byte[],">binarySearch</a>(byte[] a, byte key) Searches the specified array of bytes for the specified value using the binary search algorithm.<br />static int<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#binarySearch(char[],">binarySearch</a>(char[] a, char key) Searches the specified array of chars for the specified value using the binary search algorithm.<br />static int<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#binarySearch(double[],">binarySearch</a>(double[] a, double key) Searches the specified array of doubles for the specified value using the binary search algorithm.<br />static int<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#binarySearch(float[],">binarySearch</a>(float[] a, float key) Searches the specified array of floats for the specified value using the binary search algorithm.<br />static int<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#binarySearch(int[],">binarySearch</a>(int[] a, int key) Searches the specified array of ints for the specified value using the binary search algorithm.<br />static int<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#binarySearch(long[],">binarySearch</a>(long[] a, long key) Searches the specified array of longs for the specified value using the binary search algorithm.<br />static int<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#binarySearch(java.lang.Object[],">binarySearch</a>(<a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html">Object</a>[] a, <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html">Object</a> key) Searches the specified array for the specified object using the binary search algorithm.<br />static int<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#binarySearch(short[],">binarySearch</a>(short[] a, short key) Searches the specified array of shorts for the specified value using the binary search algorithm.<br />static<br /><t> int<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#binarySearch(T[],">binarySearch</a>(T[] a, T key, <a title="interface in java.util" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilComparator.html">Comparator</a><? super T> c) Searches the specified array for the specified object using the binary search algorithm.<br />static boolean<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#deepEquals(java.lang.Object[],">deepEquals</a>(<a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html">Object</a>[] a1, <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html">Object</a>[] a2) Returns true if the two specified arrays are deeply equal to one another.<br />static int<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#deepHashCode(java.lang.Object[])">deepHashCode</a>(<a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html">Object</a>[] a) Returns a hash code based on the "deep contents" of the specified array.<br />static <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#deepToString(java.lang.Object[])">deepToString</a>(<a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html">Object</a>[] a) Returns a string representation of the "deep contents" of the specified array.<br />static boolean<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#equals(boolean[],">equals</a>(boolean[] a, boolean[] a2) Returns true if the two specified arrays of booleans are equal to one another.<br />static boolean<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#equals(byte[],">equals</a>(byte[] a, byte[] a2) Returns true if the two specified arrays of bytes are equal to one another.<br />static boolean<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#equals(char[],">equals</a>(char[] a, char[] a2) Returns true if the two specified arrays of chars are equal to one another.<br />static boolean<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#equals(double[],">equals</a>(double[] a, double[] a2) Returns true if the two specified arrays of doubles are equal to one another.<br />static boolean<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#equals(float[],">equals</a>(float[] a, float[] a2) Returns true if the two specified arrays of floats are equal to one another.<br />static boolean<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#equals(int[],">equals</a>(int[] a, int[] a2) Returns true if the two specified arrays of ints are equal to one another.<br />static boolean<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#equals(long[],">equals</a>(long[] a, long[] a2) Returns true if the two specified arrays of longs are equal to one another.<br />static boolean<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#equals(java.lang.Object[],">equals</a>(<a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html">Object</a>[] a, <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html">Object</a>[] a2) Returns true if the two specified arrays of Objects are equal to one another.<br />static boolean<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#equals(short[],">equals</a>(short[] a, short[] a2) Returns true if the two specified arrays of shorts are equal to one another.<br />static void<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#fill(boolean[],">fill</a>(boolean[] a, boolean val) Assigns the specified boolean value to each element of the specified array of booleans.<br />static void<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#fill(boolean[],">fill</a>(boolean[] a, int fromIndex, int toIndex, boolean val) Assigns the specified boolean value to each element of the specified range of the specified array of booleans.<br />static void<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#fill(byte[],">fill</a>(byte[] a, byte val) Assigns the specified byte value to each element of the specified array of bytes.<br />static void<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#fill(byte[],">fill</a>(byte[] a, int fromIndex, int toIndex, byte val) Assigns the specified byte value to each element of the specified range of the specified array of bytes.<br />static void<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#fill(char[],">fill</a>(char[] a, char val) Assigns the specified char value to each element of the specified array of chars.<br />static void<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#fill(char[],">fill</a>(char[] a, int fromIndex, int toIndex, char val) Assigns the specified char value to each element of the specified range of the specified array of chars.<br />static void<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#fill(double[],">fill</a>(double[] a, double val) Assigns the specified double value to each element of the specified array of doubles.<br />static void<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#fill(double[],">fill</a>(double[] a, int fromIndex, int toIndex, double val) Assigns the specified double value to each element of the specified range of the specified array of doubles.<br />static void<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#fill(float[],">fill</a>(float[] a, float val) Assigns the specified float value to each element of the specified array of floats.<br />static void<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#fill(float[],">fill</a>(float[] a, int fromIndex, int toIndex, float val) Assigns the specified float value to each element of the specified range of the specified array of floats.<br />static void<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#fill(int[],">fill</a>(int[] a, int val) Assigns the specified int value to each element of the specified array of ints.<br />static void<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#fill(int[],">fill</a>(int[] a, int fromIndex, int toIndex, int val) Assigns the specified int value to each element of the specified range of the specified array of ints.<br />static void<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#fill(long[],">fill</a>(long[] a, int fromIndex, int toIndex, long val) Assigns the specified long value to each element of the specified range of the specified array of longs.<br />static void<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#fill(long[],">fill</a>(long[] a, long val) Assigns the specified long value to each element of the specified array of longs.<br />static void<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#fill(java.lang.Object[],">fill</a>(<a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html">Object</a>[] a, int fromIndex, int toIndex, <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html">Object</a> val) Assigns the specified Object reference to each element of the specified range of the specified array of Objects.<br />static void<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#fill(java.lang.Object[],">fill</a>(<a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html">Object</a>[] a, <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html">Object</a> val) Assigns the specified Object reference to each element of the specified array of Objects.<br />static void<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#fill(short[],">fill</a>(short[] a, int fromIndex, int toIndex, short val) Assigns the specified short value to each element of the specified range of the specified array of shorts.<br />static void<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#fill(short[],">fill</a>(short[] a, short val) Assigns the specified short value to each element of the specified array of shorts.<br />static int<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#hashCode(boolean[])">hashCode</a>(boolean[] a) Returns a hash code based on the contents of the specified array.<br />static int<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#hashCode(byte[])">hashCode</a>(byte[] a) Returns a hash code based on the contents of the specified array.<br />static int<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#hashCode(char[])">hashCode</a>(char[] a) Returns a hash code based on the contents of the specified array.<br />static int<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#hashCode(double[])">hashCode</a>(double[] a) Returns a hash code based on the contents of the specified array.<br />static int<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#hashCode(float[])">hashCode</a>(float[] a) Returns a hash code based on the contents of the specified array.<br />static int<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#hashCode(int[])">hashCode</a>(int[] a) Returns a hash code based on the contents of the specified array.<br />static int<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#hashCode(long[])">hashCode</a>(long[] a) Returns a hash code based on the contents of the specified array.<br />static int<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#hashCode(java.lang.Object[])">hashCode</a>(<a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html">Object</a>[] a) Returns a hash code based on the contents of the specified array.<br />static int<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#hashCode(short[])">hashCode</a>(short[] a) Returns a hash code based on the contents of the specified array.<br />static void<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#sort(byte[])">sort</a>(byte[] a) Sorts the specified array of bytes into ascending numerical order.<br />static void<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#sort(byte[],">sort</a>(byte[] a, int fromIndex, int toIndex) Sorts the specified range of the specified array of bytes into ascending numerical order.<br />static void<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#sort(char[])">sort</a>(char[] a) Sorts the specified array of chars into ascending numerical order.<br />static void<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#sort(char[],">sort</a>(char[] a, int fromIndex, int toIndex) Sorts the specified range of the specified array of chars into ascending numerical order.<br />static void<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#sort(double[])">sort</a>(double[] a) Sorts the specified array of doubles into ascending numerical order.<br />static void<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#sort(double[],">sort</a>(double[] a, int fromIndex, int toIndex) Sorts the specified range of the specified array of doubles into ascending numerical order.<br />static void<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#sort(float[])">sort</a>(float[] a) Sorts the specified array of floats into ascending numerical order.<br />static void<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#sort(float[],">sort</a>(float[] a, int fromIndex, int toIndex) Sorts the specified range of the specified array of floats into ascending numerical order.<br />static void<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#sort(int[])">sort</a>(int[] a) Sorts the specified array of ints into ascending numerical order.<br />static void<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#sort(int[],">sort</a>(int[] a, int fromIndex, int toIndex) Sorts the specified range of the specified array of ints into ascending numerical order.<br />static void<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#sort(long[])">sort</a>(long[] a) Sorts the specified array of longs into ascending numerical order.<br />static void<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#sort(long[],">sort</a>(long[] a, int fromIndex, int toIndex) Sorts the specified range of the specified array of longs into ascending numerical order.<br />static void<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#sort(java.lang.Object[])">sort</a>(<a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html">Object</a>[] a) Sorts the specified array of objects into ascending order, according to the natural ordering of its elements.<br />static void<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#sort(java.lang.Object[],">sort</a>(<a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html">Object</a>[] a, int fromIndex, int toIndex) Sorts the specified range of the specified array of objects into ascending order, according to the natural ordering of its elements.<br />static void<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#sort(short[])">sort</a>(short[] a) Sorts the specified array of shorts into ascending numerical order.<br />static void<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#sort(short[],">sort</a>(short[] a, int fromIndex, int toIndex) Sorts the specified range of the specified array of shorts into ascending numerical order.<br />static<br /><t> void<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#sort(T[],">sort</a>(T[] a, <a title="interface in java.util" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilComparator.html">Comparator</a><? super T> c) Sorts the specified array of objects according to the order induced by the specified comparator.<br />static<br /><t> void<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#sort(T[],">sort</a>(T[] a, int fromIndex, int toIndex, <a title="interface in java.util" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilComparator.html">Comparator</a><? super T> c) Sorts the specified range of the specified array of objects according to the order induced by the specified comparator.<br />static <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#toString(boolean[])">toString</a>(boolean[] a) Returns a string representation of the contents of the specified array.<br />static <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#toString(byte[])">toString</a>(byte[] a) Returns a string representation of the contents of the specified array.<br />static <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#toString(char[])">toString</a>(char[] a) Returns a string representation of the contents of the specified array.<br />static <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#toString(double[])">toString</a>(double[] a) Returns a string representation of the contents of the specified array.<br />static <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#toString(float[])">toString</a>(float[] a) Returns a string representation of the contents of the specified array.<br />static <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#toString(int[])">toString</a>(int[] a) Returns a string representation of the contents of the specified array.<br />static <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#toString(long[])">toString</a>(long[] a) Returns a string representation of the contents of the specified array.<br />static <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#toString(java.lang.Object[])">toString</a>(<a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html">Object</a>[] a) Returns a string representation of the contents of the specified array.<br />static <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#toString(short[])">toString</a>(short[] a) Returns a string representation of the contents of the specified array.<br /> <br />Methods inherited from class java.lang.<a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html">Object</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html#clone()">clone</a>, <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html#equals(java.lang.Object)">equals</a>, <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html#finalize()">finalize</a>, <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html#getClass()">getClass</a>, <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html#hashCode()">hashCode</a>, <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html#notify()">notify</a>, <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html#notifyAll()">notifyAll</a>, <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html#toString()">toString</a>, <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html#wait()">wait</a>, <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html#wait(long)">wait</a>, <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html#wait(long,">wait</a><br /> <br />Method Detail<br />sortpublic static void sort(long[] a)<br />Sorts the specified array of longs into ascending numerical order. The sorting algorithm is a tuned quicksort, adapted from Jon L. Bentley and M. Douglas McIlroy's "Engineering a Sort Function", Software-Practice and Experience, Vol. 23(11) P. 1249-1265 (November 1993). This algorithm offers n*log(n) performance on many data sets that cause other quicksorts to degrade to quadratic performance.<br />Parameters:<br />a - the array to be sorted.<br />sortpublic static void sort(long[] a, int fromIndex, int toIndex)<br />Sorts the specified range of the specified array of longs into ascending numerical order. The range to be sorted extends from index fromIndex, inclusive, to index toIndex, exclusive. (If fromIndex==toIndex, the range to be sorted is empty.)<br />The sorting algorithm is a tuned quicksort, adapted from Jon L. Bentley and M. Douglas McIlroy's "Engineering a Sort Function", Software-Practice and Experience, Vol. 23(11) P. 1249-1265 (November 1993). This algorithm offers n*log(n) performance on many data sets that cause other quicksorts to degrade to quadratic performance.<br />Parameters:<br />a - the array to be sorted.<br />fromIndex - the index of the first element (inclusive) to be sorted.<br />toIndex - the index of the last element (exclusive) to be sorted.<br />Throws:<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangIllegalArgumentException.html">IllegalArgumentException</a> - if fromIndex > toIndex<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangArrayIndexOutOfBoundsException.html">ArrayIndexOutOfBoundsException</a> - if fromIndex <> a.length<br />sortpublic static void sort(int[] a)<br />Sorts the specified array of ints into ascending numerical order. The sorting algorithm is a tuned quicksort, adapted from Jon L. Bentley and M. Douglas McIlroy's "Engineering a Sort Function", Software-Practice and Experience, Vol. 23(11) P. 1249-1265 (November 1993). This algorithm offers n*log(n) performance on many data sets that cause other quicksorts to degrade to quadratic performance.<br />Parameters:<br />a - the array to be sorted.<br />sortpublic static void sort(int[] a, int fromIndex, int toIndex)<br />Sorts the specified range of the specified array of ints into ascending numerical order. The range to be sorted extends from index fromIndex, inclusive, to index toIndex, exclusive. (If fromIndex==toIndex, the range to be sorted is empty.)<br />The sorting algorithm is a tuned quicksort, adapted from Jon L. Bentley and M. Douglas McIlroy's "Engineering a Sort Function", Software-Practice and Experience, Vol. 23(11) P. 1249-1265 (November 1993). This algorithm offers n*log(n) performance on many data sets that cause other quicksorts to degrade to quadratic performance.<br />Parameters:<br />a - the array to be sorted.<br />fromIndex - the index of the first element (inclusive) to be sorted.<br />toIndex - the index of the last element (exclusive) to be sorted.<br />Throws:<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangIllegalArgumentException.html">IllegalArgumentException</a> - if fromIndex > toIndex<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangArrayIndexOutOfBoundsException.html">ArrayIndexOutOfBoundsException</a> - if fromIndex <> a.length<br />sortpublic static void sort(short[] a)<br />Sorts the specified array of shorts into ascending numerical order. The sorting algorithm is a tuned quicksort, adapted from Jon L. Bentley and M. Douglas McIlroy's "Engineering a Sort Function", Software-Practice and Experience, Vol. 23(11) P. 1249-1265 (November 1993). This algorithm offers n*log(n) performance on many data sets that cause other quicksorts to degrade to quadratic performance.<br />Parameters:<br />a - the array to be sorted.<br />sortpublic static void sort(short[] a, int fromIndex, int toIndex)<br />Sorts the specified range of the specified array of shorts into ascending numerical order. The range to be sorted extends from index fromIndex, inclusive, to index toIndex, exclusive. (If fromIndex==toIndex, the range to be sorted is empty.)<br />The sorting algorithm is a tuned quicksort, adapted from Jon L. Bentley and M. Douglas McIlroy's "Engineering a Sort Function", Software-Practice and Experience, Vol. 23(11) P. 1249-1265 (November 1993). This algorithm offers n*log(n) performance on many data sets that cause other quicksorts to degrade to quadratic performance.<br />Parameters:<br />a - the array to be sorted.<br />fromIndex - the index of the first element (inclusive) to be sorted.<br />toIndex - the index of the last element (exclusive) to be sorted.<br />Throws:<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangIllegalArgumentException.html">IllegalArgumentException</a> - if fromIndex > toIndex<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangArrayIndexOutOfBoundsException.html">ArrayIndexOutOfBoundsException</a> - if fromIndex <> a.length<br />sortpublic static void sort(char[] a)<br />Sorts the specified array of chars into ascending numerical order. The sorting algorithm is a tuned quicksort, adapted from Jon L. Bentley and M. Douglas McIlroy's "Engineering a Sort Function", Software-Practice and Experience, Vol. 23(11) P. 1249-1265 (November 1993). This algorithm offers n*log(n) performance on many data sets that cause other quicksorts to degrade to quadratic performance.<br />Parameters:<br />a - the array to be sorted.<br />sortpublic static void sort(char[] a, int fromIndex, int toIndex)<br />Sorts the specified range of the specified array of chars into ascending numerical order. The range to be sorted extends from index fromIndex, inclusive, to index toIndex, exclusive. (If fromIndex==toIndex, the range to be sorted is empty.)<br />The sorting algorithm is a tuned quicksort, adapted from Jon L. Bentley and M. Douglas McIlroy's "Engineering a Sort Function", Software-Practice and Experience, Vol. 23(11) P. 1249-1265 (November 1993). This algorithm offers n*log(n) performance on many data sets that cause other quicksorts to degrade to quadratic performance.<br />Parameters:<br />a - the array to be sorted.<br />fromIndex - the index of the first element (inclusive) to be sorted.<br />toIndex - the index of the last element (exclusive) to be sorted.<br />Throws:<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangIllegalArgumentException.html">IllegalArgumentException</a> - if fromIndex > toIndex<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangArrayIndexOutOfBoundsException.html">ArrayIndexOutOfBoundsException</a> - if fromIndex <> a.length<br />sortpublic static void sort(byte[] a)<br />Sorts the specified array of bytes into ascending numerical order. The sorting algorithm is a tuned quicksort, adapted from Jon L. Bentley and M. Douglas McIlroy's "Engineering a Sort Function", Software-Practice and Experience, Vol. 23(11) P. 1249-1265 (November 1993). This algorithm offers n*log(n) performance on many data sets that cause other quicksorts to degrade to quadratic performance.<br />Parameters:<br />a - the array to be sorted.<br />sortpublic static void sort(byte[] a, int fromIndex, int toIndex)<br />Sorts the specified range of the specified array of bytes into ascending numerical order. The range to be sorted extends from index fromIndex, inclusive, to index toIndex, exclusive. (If fromIndex==toIndex, the range to be sorted is empty.)<br />The sorting algorithm is a tuned quicksort, adapted from Jon L. Bentley and M. Douglas McIlroy's "Engineering a Sort Function", Software-Practice and Experience, Vol. 23(11) P. 1249-1265 (November 1993). This algorithm offers n*log(n) performance on many data sets that cause other quicksorts to degrade to quadratic performance.<br />Parameters:<br />a - the array to be sorted.<br />fromIndex - the index of the first element (inclusive) to be sorted.<br />toIndex - the index of the last element (exclusive) to be sorted.<br />Throws:<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangIllegalArgumentException.html">IllegalArgumentException</a> - if fromIndex > toIndex<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangArrayIndexOutOfBoundsException.html">ArrayIndexOutOfBoundsException</a> - if fromIndex <> a.length<br />sortpublic static void sort(double[] a)<br />Sorts the specified array of doubles into ascending numerical order.<br />The < 0 ="="" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangDouble.html#compareTo(java.lang.Double)">Double.compareTo(java.lang.Double)</a>. This ordering differs from the < relation in that -0.0 is treated as less than 0.0 and NaN is considered greater than any other floating-point value. For the purposes of sorting, all NaN values are considered equivalent and equal.<br />The sorting algorithm is a tuned quicksort, adapted from Jon L. Bentley and M. Douglas McIlroy's "Engineering a Sort Function", Software-Practice and Experience, Vol. 23(11) P. 1249-1265 (November 1993). This algorithm offers n*log(n) performance on many data sets that cause other quicksorts to degrade to quadratic performance.<br />Parameters:<br />a - the array to be sorted.<br />sortpublic static void sort(double[] a, int fromIndex, int toIndex)<br />Sorts the specified range of the specified array of doubles into ascending numerical order. The range to be sorted extends from index fromIndex, inclusive, to index toIndex, exclusive. (If fromIndex==toIndex, the range to be sorted is empty.)<br />The < 0 ="="" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangDouble.html#compareTo(java.lang.Double)">Double.compareTo(java.lang.Double)</a>. This ordering differs from the < relation in that -0.0 is treated as less than 0.0 and NaN is considered greater than any other floating-point value. For the purposes of sorting, all NaN values are considered equivalent and equal.<br />The sorting algorithm is a tuned quicksort, adapted from Jon L. Bentley and M. Douglas McIlroy's "Engineering a Sort Function", Software-Practice and Experience, Vol. 23(11) P. 1249-1265 (November 1993). This algorithm offers n*log(n) performance on many data sets that cause other quicksorts to degrade to quadratic performance.<br />Parameters:<br />a - the array to be sorted.<br />fromIndex - the index of the first element (inclusive) to be sorted.<br />toIndex - the index of the last element (exclusive) to be sorted.<br />Throws:<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangIllegalArgumentException.html">IllegalArgumentException</a> - if fromIndex > toIndex<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangArrayIndexOutOfBoundsException.html">ArrayIndexOutOfBoundsException</a> - if fromIndex <> a.length<br />sortpublic static void sort(float[] a)<br />Sorts the specified array of floats into ascending numerical order.<br />The < 0f ="="" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangFloat.html#compareTo(java.lang.Float)">Float.compareTo(java.lang.Float)</a>. This ordering differs from the < relation in that -0.0f is treated as less than 0.0f and NaN is considered greater than any other floating-point value. For the purposes of sorting, all NaN values are considered equivalent and equal.<br />The sorting algorithm is a tuned quicksort, adapted from Jon L. Bentley and M. Douglas McIlroy's "Engineering a Sort Function", Software-Practice and Experience, Vol. 23(11) P. 1249-1265 (November 1993). This algorithm offers n*log(n) performance on many data sets that cause other quicksorts to degrade to quadratic performance.<br />Parameters:<br />a - the array to be sorted.<br />sortpublic static void sort(float[] a, int fromIndex, int toIndex)<br />Sorts the specified range of the specified array of floats into ascending numerical order. The range to be sorted extends from index fromIndex, inclusive, to index toIndex, exclusive. (If fromIndex==toIndex, the range to be sorted is empty.)<br />The < 0f ="="" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangFloat.html#compareTo(java.lang.Float)">Float.compareTo(java.lang.Float)</a>. This ordering differs from the < relation in that -0.0f is treated as less than 0.0f and NaN is considered greater than any other floating-point value. For the purposes of sorting, all NaN values are considered equivalent and equal.<br />The sorting algorithm is a tuned quicksort, adapted from Jon L. Bentley and M. Douglas McIlroy's "Engineering a Sort Function", Software-Practice and Experience, Vol. 23(11) P. 1249-1265 (November 1993). This algorithm offers n*log(n) performance on many data sets that cause other quicksorts to degrade to quadratic performance.<br />Parameters:<br />a - the array to be sorted.<br />fromIndex - the index of the first element (inclusive) to be sorted.<br />toIndex - the index of the last element (exclusive) to be sorted.<br />Throws:<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangIllegalArgumentException.html">IllegalArgumentException</a> - if fromIndex > toIndex<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangArrayIndexOutOfBoundsException.html">ArrayIndexOutOfBoundsException</a> - if fromIndex <> a.length<br />sortpublic static void sort(<a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html">Object</a>[] a)<br />Sorts the specified array of objects into ascending order, according to the natural ordering of its elements. All elements in the array must implement the Comparable interface. Furthermore, all elements in the array must be mutually comparable (that is, e1.compareTo(e2) must not throw a ClassCastException for any elements e1 and e2 in the array).<br />This sort is guaranteed to be stable: equal elements will not be reordered as a result of the sort.<br />The sorting algorithm is a modified mergesort (in which the merge is omitted if the highest element in the low sublist is less than the lowest element in the high sublist). This algorithm offers guaranteed n*log(n) performance.<br />Parameters:<br />a - the array to be sorted.<br />Throws:<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangClassCastException.html">ClassCastException</a> - if the array contains elements that are not mutually comparable (for example, strings and integers).<br />See Also:<br /><a title="interface in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangComparable.html">Comparable</a><br />sortpublic static void sort(<a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html">Object</a>[] a, int fromIndex, int toIndex)<br />Sorts the specified range of the specified array of objects into ascending order, according to the natural ordering of its elements. The range to be sorted extends from index fromIndex, inclusive, to index toIndex, exclusive. (If fromIndex==toIndex, the range to be sorted is empty.) All elements in this range must implement the Comparable interface. Furthermore, all elements in this range must be mutually comparable (that is, e1.compareTo(e2) must not throw a ClassCastException for any elements e1 and e2 in the array).<br />This sort is guaranteed to be stable: equal elements will not be reordered as a result of the sort.<br />The sorting algorithm is a modified mergesort (in which the merge is omitted if the highest element in the low sublist is less than the lowest element in the high sublist). This algorithm offers guaranteed n*log(n) performance.<br />Parameters:<br />a - the array to be sorted.<br />fromIndex - the index of the first element (inclusive) to be sorted.<br />toIndex - the index of the last element (exclusive) to be sorted.<br />Throws:<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangIllegalArgumentException.html">IllegalArgumentException</a> - if fromIndex > toIndex<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangArrayIndexOutOfBoundsException.html">ArrayIndexOutOfBoundsException</a> - if fromIndex <> a.length<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangClassCastException.html">ClassCastException</a> - if the array contains elements that are not mutually comparable (for example, strings and integers).<br />See Also:<br /><a title="interface in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangComparable.html">Comparable</a><br />sortpublic static <t> void sort(T[] a, <a title="interface in java.util" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilComparator.html">Comparator</a><? super T> c)<br />Sorts the specified array of objects according to the order induced by the specified comparator. All elements in the array must be mutually comparable by the specified comparator (that is, c.compare(e1, e2) must not throw a ClassCastException for any elements e1 and e2 in the array).<br />This sort is guaranteed to be stable: equal elements will not be reordered as a result of the sort.<br />The sorting algorithm is a modified mergesort (in which the merge is omitted if the highest element in the low sublist is less than the lowest element in the high sublist). This algorithm offers guaranteed n*log(n) performance.<br />Parameters:<br />a - the array to be sorted.<br />c - the comparator to determine the order of the array. A null value indicates that the elements' natural ordering should be used.<br />Throws:<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangClassCastException.html">ClassCastException</a> - if the array contains elements that are not mutually comparable using the specified comparator.<br />See Also:<br /><a title="interface in java.util" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilComparator.html">Comparator</a><br />sortpublic static <t> void sort(T[] a, int fromIndex, int toIndex, <a title="interface in java.util" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilComparator.html">Comparator</a><? super T> c)<br />Sorts the specified range of the specified array of objects according to the order induced by the specified comparator. The range to be sorted extends from index fromIndex, inclusive, to index toIndex, exclusive. (If fromIndex==toIndex, the range to be sorted is empty.) All elements in the range must be mutually comparable by the specified comparator (that is, c.compare(e1, e2) must not throw a ClassCastException for any elements e1 and e2 in the range).<br />This sort is guaranteed to be stable: equal elements will not be reordered as a result of the sort.<br />The sorting algorithm is a modified mergesort (in which the merge is omitted if the highest element in the low sublist is less than the lowest element in the high sublist). This algorithm offers guaranteed n*log(n) performance.<br />Parameters:<br />a - the array to be sorted.<br />fromIndex - the index of the first element (inclusive) to be sorted.<br />toIndex - the index of the last element (exclusive) to be sorted.<br />c - the comparator to determine the order of the array. A null value indicates that the elements' natural ordering should be used.<br />Throws:<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangClassCastException.html">ClassCastException</a> - if the array contains elements that are not mutually comparable using the specified comparator.<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangIllegalArgumentException.html">IllegalArgumentException</a> - if fromIndex > toIndex<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangArrayIndexOutOfBoundsException.html">ArrayIndexOutOfBoundsException</a> - if fromIndex <> a.length<br />See Also:<br /><a title="interface in java.util" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilComparator.html">Comparator</a><br />binarySearchpublic static int binarySearch(long[] a, long key)<br />Searches the specified array of longs for the specified value using the binary search algorithm. The array must be sorted (as by the sort method, above) prior to making this call. If it is not sorted, the results are undefined. If the array contains multiple elements with the specified value, there is no guarantee which one will be found.<br />Parameters:<br />a - the array to be searched.<br />key - the value to be searched for.<br />Returns:<br />index of the search key, if it is contained in the list; otherwise, (-(insertion point) - 1). The insertion point is defined as the point at which the key would be inserted into the list: the index of the first element greater than the key, or list.size(), if all elements in the list are less than the specified key. Note that this guarantees that the return value will be >= 0 if and only if the key is found.<br />See Also:<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#sort(long[])">sort(long[])</a><br />binarySearchpublic static int binarySearch(int[] a, int key)<br />Searches the specified array of ints for the specified value using the binary search algorithm. The array must be sorted (as by the sort method, above) prior to making this call. If it is not sorted, the results are undefined. If the array contains multiple elements with the specified value, there is no guarantee which one will be found.<br />Parameters:<br />a - the array to be searched.<br />key - the value to be searched for.<br />Returns:<br />index of the search key, if it is contained in the list; otherwise, (-(insertion point) - 1). The insertion point is defined as the point at which the key would be inserted into the list: the index of the first element greater than the key, or list.size(), if all elements in the list are less than the specified key. Note that this guarantees that the return value will be >= 0 if and only if the key is found.<br />See Also:<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#sort(int[])">sort(int[])</a><br />binarySearchpublic static int binarySearch(short[] a, short key)<br />Searches the specified array of shorts for the specified value using the binary search algorithm. The array must be sorted (as by the sort method, above) prior to making this call. If it is not sorted, the results are undefined. If the array contains multiple elements with the specified value, there is no guarantee which one will be found.<br />Parameters:<br />a - the array to be searched.<br />key - the value to be searched for.<br />Returns:<br />index of the search key, if it is contained in the list; otherwise, (-(insertion point) - 1). The insertion point is defined as the point at which the key would be inserted into the list: the index of the first element greater than the key, or list.size(), if all elements in the list are less than the specified key. Note that this guarantees that the return value will be >= 0 if and only if the key is found.<br />See Also:<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#sort(short[])">sort(short[])</a><br />binarySearchpublic static int binarySearch(char[] a, char key)<br />Searches the specified array of chars for the specified value using the binary search algorithm. The array must be sorted (as by the sort method, above) prior to making this call. If it is not sorted, the results are undefined. If the array contains multiple elements with the specified value, there is no guarantee which one will be found.<br />Parameters:<br />a - the array to be searched.<br />key - the value to be searched for.<br />Returns:<br />index of the search key, if it is contained in the list; otherwise, (-(insertion point) - 1). The insertion point is defined as the point at which the key would be inserted into the list: the index of the first element greater than the key, or list.size(), if all elements in the list are less than the specified key. Note that this guarantees that the return value will be >= 0 if and only if the key is found.<br />See Also:<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#sort(char[])">sort(char[])</a><br />binarySearchpublic static int binarySearch(byte[] a, byte key)<br />Searches the specified array of bytes for the specified value using the binary search algorithm. The array must be sorted (as by the sort method, above) prior to making this call. If it is not sorted, the results are undefined. If the array contains multiple elements with the specified value, there is no guarantee which one will be found.<br />Parameters:<br />a - the array to be searched.<br />key - the value to be searched for.<br />Returns:<br />index of the search key, if it is contained in the list; otherwise, (-(insertion point) - 1). The insertion point is defined as the point at which the key would be inserted into the list: the index of the first element greater than the key, or list.size(), if all elements in the list are less than the specified key. Note that this guarantees that the return value will be >= 0 if and only if the key is found.<br />See Also:<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#sort(byte[])">sort(byte[])</a><br />binarySearchpublic static int binarySearch(double[] a, double key)<br />Searches the specified array of doubles for the specified value using the binary search algorithm. The array must be sorted (as by the sort method, above) prior to making this call. If it is not sorted, the results are undefined. If the array contains multiple elements with the specified value, there is no guarantee which one will be found. This method considers all NaN values to be equivalent and equal.<br />Parameters:<br />a - the array to be searched.<br />key - the value to be searched for.<br />Returns:<br />index of the search key, if it is contained in the list; otherwise, (-(insertion point) - 1). The insertion point is defined as the point at which the key would be inserted into the list: the index of the first element greater than the key, or list.size(), if all elements in the list are less than the specified key. Note that this guarantees that the return value will be >= 0 if and only if the key is found.<br />See Also:<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#sort(double[])">sort(double[])</a><br />binarySearchpublic static int binarySearch(float[] a, float key)<br />Searches the specified array of floats for the specified value using the binary search algorithm. The array must be sorted (as by the sort method, above) prior to making this call. If it is not sorted, the results are undefined. If the array contains multiple elements with the specified value, there is no guarantee which one will be found. This method considers all NaN values to be equivalent and equal.<br />Parameters:<br />a - the array to be searched.<br />key - the value to be searched for.<br />Returns:<br />index of the search key, if it is contained in the list; otherwise, (-(insertion point) - 1). The insertion point is defined as the point at which the key would be inserted into the list: the index of the first element greater than the key, or list.size(), if all elements in the list are less than the specified key. Note that this guarantees that the return value will be >= 0 if and only if the key is found.<br />See Also:<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#sort(float[])">sort(float[])</a><br />binarySearchpublic static int binarySearch(<a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html">Object</a>[] a, <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html">Object</a> key)<br />Searches the specified array for the specified object using the binary search algorithm. The array must be sorted into ascending order according to the natural ordering of its elements (as by Sort(Object[]), above) prior to making this call. If it is not sorted, the results are undefined. (If the array contains elements that are not mutually comparable (for example,strings and integers), it cannot be sorted according to the natural order of its elements, hence results are undefined.) If the array contains multiple elements equal to the specified object, there is no guarantee which one will be found.<br />Parameters:<br />a - the array to be searched.<br />key - the value to be searched for.<br />Returns:<br />index of the search key, if it is contained in the list; otherwise, (-(insertion point) - 1). The insertion point is defined as the point at which the key would be inserted into the list: the index of the first element greater than the key, or list.size(), if all elements in the list are less than the specified key. Note that this guarantees that the return value will be >= 0 if and only if the key is found.<br />Throws:<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangClassCastException.html">ClassCastException</a> - if the search key in not comparable to the elements of the array.<br />See Also:<br /><a title="interface in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangComparable.html">Comparable</a>, <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#sort(java.lang.Object[])">sort(Object[])</a><br />binarySearchpublic static <t> int binarySearch(T[] a, T key, <a title="interface in java.util" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilComparator.html">Comparator</a><? super T> c)<br />Searches the specified array for the specified object using the binary search algorithm. The array must be sorted into ascending order according to the specified comparator (as by the Sort(Object[], Comparator) method, above), prior to making this call. If it is not sorted, the results are undefined. If the array contains multiple elements equal to the specified object, there is no guarantee which one will be found.<br />Parameters:<br />a - the array to be searched.<br />key - the value to be searched for.<br />c - the comparator by which the array is ordered. A null value indicates that the elements' natural ordering should be used.<br />Returns:<br />index of the search key, if it is contained in the list; otherwise, (-(insertion point) - 1). The insertion point is defined as the point at which the key would be inserted into the list: the index of the first element greater than the key, or list.size(), if all elements in the list are less than the specified key. Note that this guarantees that the return value will be >= 0 if and only if the key is found.<br />Throws:<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangClassCastException.html">ClassCastException</a> - if the array contains elements that are not mutually comparable using the specified comparator, or the search key in not mutually comparable with the elements of the array using this comparator.<br />See Also:<br /><a title="interface in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangComparable.html">Comparable</a>, <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#sort(T[],">sort(Object[], Comparator)</a><br />equalspublic static boolean equals(long[] a, long[] a2)<br />Returns true if the two specified arrays of longs are equal to one another. Two arrays are considered equal if both arrays contain the same number of elements, and all corresponding pairs of elements in the two arrays are equal. In other words, two arrays are equal if they contain the same elements in the same order. Also, two array references are considered equal if both are null.<br />Parameters:<br />a - one array to be tested for equality.<br />a2 - the other array to be tested for equality.<br />Returns:<br />true if the two arrays are equal.<br />equalspublic static boolean equals(int[] a, int[] a2)<br />Returns true if the two specified arrays of ints are equal to one another. Two arrays are considered equal if both arrays contain the same number of elements, and all corresponding pairs of elements in the two arrays are equal. In other words, two arrays are equal if they contain the same elements in the same order. Also, two array references are considered equal if both are null.<br />Parameters:<br />a - one array to be tested for equality.<br />a2 - the other array to be tested for equality.<br />Returns:<br />true if the two arrays are equal.<br />equalspublic static boolean equals(short[] a, short[] a2)<br />Returns true if the two specified arrays of shorts are equal to one another. Two arrays are considered equal if both arrays contain the same number of elements, and all corresponding pairs of elements in the two arrays are equal. In other words, two arrays are equal if they contain the same elements in the same order. Also, two array references are considered equal if both are null.<br />Parameters:<br />a - one array to be tested for equality.<br />a2 - the other array to be tested for equality.<br />Returns:<br />true if the two arrays are equal.<br />equalspublic static boolean equals(char[] a, char[] a2)<br />Returns true if the two specified arrays of chars are equal to one another. Two arrays are considered equal if both arrays contain the same number of elements, and all corresponding pairs of elements in the two arrays are equal. In other words, two arrays are equal if they contain the same elements in the same order. Also, two array references are considered equal if both are null.<br />Parameters:<br />a - one array to be tested for equality.<br />a2 - the other array to be tested for equality.<br />Returns:<br />true if the two arrays are equal.<br />equalspublic static boolean equals(byte[] a, byte[] a2)<br />Returns true if the two specified arrays of bytes are equal to one another. Two arrays are considered equal if both arrays contain the same number of elements, and all corresponding pairs of elements in the two arrays are equal. In other words, two arrays are equal if they contain the same elements in the same order. Also, two array references are considered equal if both are null.<br />Parameters:<br />a - one array to be tested for equality.<br />a2 - the other array to be tested for equality.<br />Returns:<br />true if the two arrays are equal.<br />equalspublic static boolean equals(boolean[] a, boolean[] a2)<br />Returns true if the two specified arrays of booleans are equal to one another. Two arrays are considered equal if both arrays contain the same number of elements, and all corresponding pairs of elements in the two arrays are equal. In other words, two arrays are equal if they contain the same elements in the same order. Also, two array references are considered equal if both are null.<br />Parameters:<br />a - one array to be tested for equality.<br />a2 - the other array to be tested for equality.<br />Returns:<br />true if the two arrays are equal.<br />equalspublic static boolean equals(double[] a, double[] a2)<br />Returns true if the two specified arrays of doubles are equal to one another. Two arrays are considered equal if both arrays contain the same number of elements, and all corresponding pairs of elements in the two arrays are equal. In other words, two arrays are equal if they contain the same elements in the same order. Also, two array references are considered equal if both are null.<br />Two doubles d1 and d2 are considered equal if: new Double(d1).equals(new Double(d2))<br />(Unlike the == operator, this method considers NaN equals to itself, and 0.0d unequal to -0.0d.)<br />Parameters:<br />a - one array to be tested for equality.<br />a2 - the other array to be tested for equality.<br />Returns:<br />true if the two arrays are equal.<br />See Also:<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangDouble.html#equals(java.lang.Object)">Double.equals(Object)</a><br />equalspublic static boolean equals(float[] a, float[] a2)<br />Returns true if the two specified arrays of floats are equal to one another. Two arrays are considered equal if both arrays contain the same number of elements, and all corresponding pairs of elements in the two arrays are equal. In other words, two arrays are equal if they contain the same elements in the same order. Also, two array references are considered equal if both are null.<br />Two floats f1 and f2 are considered equal if: new Float(f1).equals(new Float(f2))<br />(Unlike the == operator, this method considers NaN equals to itself, and 0.0f unequal to -0.0f.)<br />Parameters:<br />a - one array to be tested for equality.<br />a2 - the other array to be tested for equality.<br />Returns:<br />true if the two arrays are equal.<br />See Also:<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangFloat.html#equals(java.lang.Object)">Float.equals(Object)</a><br />equalspublic static boolean equals(<a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html">Object</a>[] a, <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html">Object</a>[] a2)<br />Returns true if the two specified arrays of Objects are equal to one another. The two arrays are considered equal if both arrays contain the same number of elements, and all corresponding pairs of elements in the two arrays are equal. Two objects e1 and e2 are considered equal if (e1==null ? e2==null : e1.equals(e2)). In other words, the two arrays are equal if they contain the same elements in the same order. Also, two array references are considered equal if both are null.<br />Parameters:<br />a - one array to be tested for equality.<br />a2 - the other array to be tested for equality.<br />Returns:<br />true if the two arrays are equal.<br />fillpublic static void fill(long[] a, long val)<br />Assigns the specified long value to each element of the specified array of longs.<br />Parameters:<br />a - the array to be filled.<br />val - the value to be stored in all elements of the array.<br />fillpublic static void fill(long[] a, int fromIndex, int toIndex, long val)<br />Assigns the specified long value to each element of the specified range of the specified array of longs. The range to be filled extends from index fromIndex, inclusive, to index toIndex, exclusive. (If fromIndex==toIndex, the range to be filled is empty.)<br />Parameters:<br />a - the array to be filled.<br />fromIndex - the index of the first element (inclusive) to be filled with the specified value.<br />toIndex - the index of the last element (exclusive) to be filled with the specified value.<br />val - the value to be stored in all elements of the array.<br />Throws:<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangIllegalArgumentException.html">IllegalArgumentException</a> - if fromIndex > toIndex<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangArrayIndexOutOfBoundsException.html">ArrayIndexOutOfBoundsException</a> - if fromIndex <> a.length<br />fillpublic static void fill(int[] a, int val)<br />Assigns the specified int value to each element of the specified array of ints.<br />Parameters:<br />a - the array to be filled.<br />val - the value to be stored in all elements of the array.<br />fillpublic static void fill(int[] a, int fromIndex, int toIndex, int val)<br />Assigns the specified int value to each element of the specified range of the specified array of ints. The range to be filled extends from index fromIndex, inclusive, to index toIndex, exclusive. (If fromIndex==toIndex, the range to be filled is empty.)<br />Parameters:<br />a - the array to be filled.<br />fromIndex - the index of the first element (inclusive) to be filled with the specified value.<br />toIndex - the index of the last element (exclusive) to be filled with the specified value.<br />val - the value to be stored in all elements of the array.<br />Throws:<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangIllegalArgumentException.html">IllegalArgumentException</a> - if fromIndex > toIndex<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangArrayIndexOutOfBoundsException.html">ArrayIndexOutOfBoundsException</a> - if fromIndex <> a.length<br />fillpublic static void fill(short[] a, short val)<br />Assigns the specified short value to each element of the specified array of shorts.<br />Parameters:<br />a - the array to be filled.<br />val - the value to be stored in all elements of the array.<br />fillpublic static void fill(short[] a, int fromIndex, int toIndex, short val)<br />Assigns the specified short value to each element of the specified range of the specified array of shorts. The range to be filled extends from index fromIndex, inclusive, to index toIndex, exclusive. (If fromIndex==toIndex, the range to be filled is empty.)<br />Parameters:<br />a - the array to be filled.<br />fromIndex - the index of the first element (inclusive) to be filled with the specified value.<br />toIndex - the index of the last element (exclusive) to be filled with the specified value.<br />val - the value to be stored in all elements of the array.<br />Throws:<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangIllegalArgumentException.html">IllegalArgumentException</a> - if fromIndex > toIndex<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangArrayIndexOutOfBoundsException.html">ArrayIndexOutOfBoundsException</a> - if fromIndex <> a.length<br />fillpublic static void fill(char[] a, char val)<br />Assigns the specified char value to each element of the specified array of chars.<br />Parameters:<br />a - the array to be filled.<br />val - the value to be stored in all elements of the array.<br />fillpublic static void fill(char[] a, int fromIndex, int toIndex, char val)<br />Assigns the specified char value to each element of the specified range of the specified array of chars. The range to be filled extends from index fromIndex, inclusive, to index toIndex, exclusive. (If fromIndex==toIndex, the range to be filled is empty.)<br />Parameters:<br />a - the array to be filled.<br />fromIndex - the index of the first element (inclusive) to be filled with the specified value.<br />toIndex - the index of the last element (exclusive) to be filled with the specified value.<br />val - the value to be stored in all elements of the array.<br />Throws:<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangIllegalArgumentException.html">IllegalArgumentException</a> - if fromIndex > toIndex<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangArrayIndexOutOfBoundsException.html">ArrayIndexOutOfBoundsException</a> - if fromIndex <> a.length<br />fillpublic static void fill(byte[] a, byte val)<br />Assigns the specified byte value to each element of the specified array of bytes.<br />Parameters:<br />a - the array to be filled.<br />val - the value to be stored in all elements of the array.<br />fillpublic static void fill(byte[] a, int fromIndex, int toIndex, byte val)<br />Assigns the specified byte value to each element of the specified range of the specified array of bytes. The range to be filled extends from index fromIndex, inclusive, to index toIndex, exclusive. (If fromIndex==toIndex, the range to be filled is empty.)<br />Parameters:<br />a - the array to be filled.<br />fromIndex - the index of the first element (inclusive) to be filled with the specified value.<br />toIndex - the index of the last element (exclusive) to be filled with the specified value.<br />val - the value to be stored in all elements of the array.<br />Throws:<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangIllegalArgumentException.html">IllegalArgumentException</a> - if fromIndex > toIndex<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangArrayIndexOutOfBoundsException.html">ArrayIndexOutOfBoundsException</a> - if fromIndex <> a.length<br />fillpublic static void fill(boolean[] a, boolean val)<br />Assigns the specified boolean value to each element of the specified array of booleans.<br />Parameters:<br />a - the array to be filled.<br />val - the value to be stored in all elements of the array.<br />fillpublic static void fill(boolean[] a, int fromIndex, int toIndex, boolean val)<br />Assigns the specified boolean value to each element of the specified range of the specified array of booleans. The range to be filled extends from index fromIndex, inclusive, to index toIndex, exclusive. (If fromIndex==toIndex, the range to be filled is empty.)<br />Parameters:<br />a - the array to be filled.<br />fromIndex - the index of the first element (inclusive) to be filled with the specified value.<br />toIndex - the index of the last element (exclusive) to be filled with the specified value.<br />val - the value to be stored in all elements of the array.<br />Throws:<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangIllegalArgumentException.html">IllegalArgumentException</a> - if fromIndex > toIndex<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangArrayIndexOutOfBoundsException.html">ArrayIndexOutOfBoundsException</a> - if fromIndex <> a.length<br />fillpublic static void fill(double[] a, double val)<br />Assigns the specified double value to each element of the specified array of doubles.<br />Parameters:<br />a - the array to be filled.<br />val - the value to be stored in all elements of the array.<br />fillpublic static void fill(double[] a, int fromIndex, int toIndex, double val)<br />Assigns the specified double value to each element of the specified range of the specified array of doubles. The range to be filled extends from index fromIndex, inclusive, to index toIndex, exclusive. (If fromIndex==toIndex, the range to be filled is empty.)<br />Parameters:<br />a - the array to be filled.<br />fromIndex - the index of the first element (inclusive) to be filled with the specified value.<br />toIndex - the index of the last element (exclusive) to be filled with the specified value.<br />val - the value to be stored in all elements of the array.<br />Throws:<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangIllegalArgumentException.html">IllegalArgumentException</a> - if fromIndex > toIndex<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangArrayIndexOutOfBoundsException.html">ArrayIndexOutOfBoundsException</a> - if fromIndex <> a.length<br />fillpublic static void fill(float[] a, float val)<br />Assigns the specified float value to each element of the specified array of floats.<br />Parameters:<br />a - the array to be filled.<br />val - the value to be stored in all elements of the array.<br />fillpublic static void fill(float[] a, int fromIndex, int toIndex, float val)<br />Assigns the specified float value to each element of the specified range of the specified array of floats. The range to be filled extends from index fromIndex, inclusive, to index toIndex, exclusive. (If fromIndex==toIndex, the range to be filled is empty.)<br />Parameters:<br />a - the array to be filled.<br />fromIndex - the index of the first element (inclusive) to be filled with the specified value.<br />toIndex - the index of the last element (exclusive) to be filled with the specified value.<br />val - the value to be stored in all elements of the array.<br />Throws:<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangIllegalArgumentException.html">IllegalArgumentException</a> - if fromIndex > toIndex<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangArrayIndexOutOfBoundsException.html">ArrayIndexOutOfBoundsException</a> - if fromIndex <> a.length<br />fillpublic static void fill(<a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html">Object</a>[] a, <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html">Object</a> val)<br />Assigns the specified Object reference to each element of the specified array of Objects.<br />Parameters:<br />a - the array to be filled.<br />val - the value to be stored in all elements of the array.<br />fillpublic static void fill(<a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html">Object</a>[] a, int fromIndex, int toIndex, <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html">Object</a> val)<br />Assigns the specified Object reference to each element of the specified range of the specified array of Objects. The range to be filled extends from index fromIndex, inclusive, to index toIndex, exclusive. (If fromIndex==toIndex, the range to be filled is empty.)<br />Parameters:<br />a - the array to be filled.<br />fromIndex - the index of the first element (inclusive) to be filled with the specified value.<br />toIndex - the index of the last element (exclusive) to be filled with the specified value.<br />val - the value to be stored in all elements of the array.<br />Throws:<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangIllegalArgumentException.html">IllegalArgumentException</a> - if fromIndex > toIndex<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangArrayIndexOutOfBoundsException.html">ArrayIndexOutOfBoundsException</a> - if fromIndex <> a.length<br />asListpublic static <t> <a title="interface in java.util" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilList.html">List</a><t> asList(T... a)<br />Returns a fixed-size list backed by the specified array. (Changes to the returned list "write through" to the array.) This method acts as bridge between array-based and collection-based APIs, in combination with Collection.toArray. The returned list is serializable and implements <a title="interface in java.util" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilRandomAccess.html">RandomAccess</a>.<br />This method also provides a convenient way to create a fixed-size list initialized to contain several elements: List stooges = Arrays.asList("Larry", "Moe", "Curly");<br />Parameters:<br />a - the array by which the list will be backed.<br />Returns:<br />a list view of the specified array.<br />See Also:<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilCollection.html#toArray()">Collection.toArray()</a><br />hashCodepublic static int hashCode(long[] a)<br />Returns a hash code based on the contents of the specified array. For any two long arrays a and b such that Arrays.equals(a, b), it is also the case that Arrays.hashCode(a) == Arrays.hashCode(b).<br />The value returned by this method is the same value that would be obtained by invoking the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilList.html#hashCode()">hashCode</a> method on a <a title="interface in java.util" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilList.html">List</a> containing a sequence of <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangLong.html">Long</a> instances representing the elements of a in the same order. If a is null, this method returns 0.<br />Parameters:<br />a - the array whose hash value to compute<br />Returns:<br />a content-based hash code for a<br />Since:<br />1.5<br />hashCodepublic static int hashCode(int[] a)<br />Returns a hash code based on the contents of the specified array. For any two non-null int arrays a and b such that Arrays.equals(a, b), it is also the case that Arrays.hashCode(a) == Arrays.hashCode(b).<br />The value returned by this method is the same value that would be obtained by invoking the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilList.html#hashCode()">hashCode</a> method on a <a title="interface in java.util" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilList.html">List</a> containing a sequence of <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangInteger.html">Integer</a> instances representing the elements of a in the same order. If a is null, this method returns 0.<br />Parameters:<br />a - the array whose hash value to compute<br />Returns:<br />a content-based hash code for a<br />Since:<br />1.5<br />hashCodepublic static int hashCode(short[] a)<br />Returns a hash code based on the contents of the specified array. For any two short arrays a and b such that Arrays.equals(a, b), it is also the case that Arrays.hashCode(a) == Arrays.hashCode(b).<br />The value returned by this method is the same value that would be obtained by invoking the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilList.html#hashCode()">hashCode</a> method on a <a title="interface in java.util" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilList.html">List</a> containing a sequence of <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangShort.html">Short</a> instances representing the elements of a in the same order. If a is null, this method returns 0.<br />Parameters:<br />a - the array whose hash value to compute<br />Returns:<br />a content-based hash code for a<br />Since:<br />1.5<br />hashCodepublic static int hashCode(char[] a)<br />Returns a hash code based on the contents of the specified array. For any two char arrays a and b such that Arrays.equals(a, b), it is also the case that Arrays.hashCode(a) == Arrays.hashCode(b).<br />The value returned by this method is the same value that would be obtained by invoking the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilList.html#hashCode()">hashCode</a> method on a <a title="interface in java.util" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilList.html">List</a> containing a sequence of <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangCharacter.html">Character</a> instances representing the elements of a in the same order. If a is null, this method returns 0.<br />Parameters:<br />a - the array whose hash value to compute<br />Returns:<br />a content-based hash code for a<br />Since:<br />1.5<br />hashCodepublic static int hashCode(byte[] a)<br />Returns a hash code based on the contents of the specified array. For any two byte arrays a and b such that Arrays.equals(a, b), it is also the case that Arrays.hashCode(a) == Arrays.hashCode(b).<br />The value returned by this method is the same value that would be obtained by invoking the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilList.html#hashCode()">hashCode</a> method on a <a title="interface in java.util" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilList.html">List</a> containing a sequence of <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangByte.html">Byte</a> instances representing the elements of a in the same order. If a is null, this method returns 0.<br />Parameters:<br />a - the array whose hash value to compute<br />Returns:<br />a content-based hash code for a<br />Since:<br />1.5<br />hashCodepublic static int hashCode(boolean[] a)<br />Returns a hash code based on the contents of the specified array. For any two boolean arrays a and b such that Arrays.equals(a, b), it is also the case that Arrays.hashCode(a) == Arrays.hashCode(b).<br />The value returned by this method is the same value that would be obtained by invoking the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilList.html#hashCode()">hashCode</a> method on a <a title="interface in java.util" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilList.html">List</a> containing a sequence of <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangBoolean.html">Boolean</a> instances representing the elements of a in the same order. If a is null, this method returns 0.<br />Parameters:<br />a - the array whose hash value to compute<br />Returns:<br />a content-based hash code for a<br />Since:<br />1.5<br />hashCodepublic static int hashCode(float[] a)<br />Returns a hash code based on the contents of the specified array. For any two float arrays a and b such that Arrays.equals(a, b), it is also the case that Arrays.hashCode(a) == Arrays.hashCode(b).<br />The value returned by this method is the same value that would be obtained by invoking the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilList.html#hashCode()">hashCode</a> method on a <a title="interface in java.util" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilList.html">List</a> containing a sequence of <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangFloat.html">Float</a> instances representing the elements of a in the same order. If a is null, this method returns 0.<br />Parameters:<br />a - the array whose hash value to compute<br />Returns:<br />a content-based hash code for a<br />Since:<br />1.5<br />hashCodepublic static int hashCode(double[] a)<br />Returns a hash code based on the contents of the specified array. For any two double arrays a and b such that Arrays.equals(a, b), it is also the case that Arrays.hashCode(a) == Arrays.hashCode(b).<br />The value returned by this method is the same value that would be obtained by invoking the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilList.html#hashCode()">hashCode</a> method on a <a title="interface in java.util" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilList.html">List</a> containing a sequence of <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangDouble.html">Double</a> instances representing the elements of a in the same order. If a is null, this method returns 0.<br />Parameters:<br />a - the array whose hash value to compute<br />Returns:<br />a content-based hash code for a<br />Since:<br />1.5<br />hashCodepublic static int hashCode(<a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html">Object</a>[] a)<br />Returns a hash code based on the contents of the specified array. If the array contains other arrays as elements, the hash code is based on their identities rather than their contents. It is therefore acceptable to invoke this method on an array that contains itself as an element, either directly or indirectly through one or more levels of arrays.<br />For any two arrays a and b such that Arrays.equals(a, b), it is also the case that Arrays.hashCode(a) == Arrays.hashCode(b).<br />The value returned by this method is equal to the value that would be returned by Arrays.asList(a).hashCode(), unless a is null, in which case 0 is returned.<br />Parameters:<br />a - the array whose content-based hash code to compute<br />Returns:<br />a content-based hash code for a<br />Since:<br />1.5<br />See Also:<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#deepHashCode(java.lang.Object[])">deepHashCode(Object[])</a><br />deepHashCodepublic static int deepHashCode(<a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html">Object</a>[] a)<br />Returns a hash code based on the "deep contents" of the specified array. If the array contains other arrays as elements, the hash code is based on their contents and so on, ad infinitum. It is therefore unacceptable to invoke this method on an array that contains itself as an element, either directly or indirectly through one or more levels of arrays. The behavior of such an invocation is undefined.<br />For any two arrays a and b such that Arrays.deepEquals(a, b), it is also the case that Arrays.deepHashCode(a) == Arrays.deepHashCode(b).<br />The computation of the value returned by this method is similar to that of the value returned by <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilList.html#hashCode()">List.hashCode()</a> on a list containing the same elements as a in the same order, with one difference: If an element e of a is itself an array, its hash code is computed not by calling e.hashCode(), but as by calling the appropriate overloading of Arrays.hashCode(e) if e is an array of a primitive type, or as by calling Arrays.deepHashCode(e) recursively if e is an array of a reference type. If a is null, this method returns 0.<br />Parameters:<br />a - the array whose deep-content-based hash code to compute<br />Returns:<br />a deep-content-based hash code for a<br />Since:<br />1.5<br />See Also:<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#hashCode(java.lang.Object[])">hashCode(Object[])</a><br />deepEqualspublic static boolean deepEquals(<a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html">Object</a>[] a1, <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html">Object</a>[] a2)<br />Returns true if the two specified arrays are deeply equal to one another. Unlike the @link{#equals{Object[],Object[]) method, this method is appropriate for use with nested arrays of arbitrary depth.<br />Two array references are considered deeply equal if both are null, or if they refer to arrays that contain the same number of elements and all corresponding pairs of elements in the two arrays are deeply equal.<br />Two possibly null elements e1 and e2 are deeply equal if any of the following conditions hold:<br />· e1 and e2 are both arrays of object reference types, and Arrays.deepEquals(e1, e2) would return true<br />· e1 and e2 are arrays of the same primitive type, and the appropriate overloading of Arrays.equals(e1, e2) would return true.<br />· e1 == e2<br />· e1.equals(e2) would return true.<br />Note that this definition permits null elements at any depth.<br />If either of the specified arrays contain themselves as elements either directly or indirectly through one or more levels of arrays, the behavior of this method is undefined.<br />Parameters:<br />a1 - one array to be tested for equality<br />a2 - the other array to be tested for equality<br />Returns:<br />true if the two arrays are equal<br />Since:<br />1.5<br />See Also:<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#equals(java.lang.Object[],">equals(Object[],Object[])</a><br />toStringpublic static <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> toString(long[] a)<br />Returns a string representation of the contents of the specified array. The string representation consists of a list of the array's elements, enclosed in square brackets ("[]"). Adjacent elements are separated by the characters ", " (a comma followed by a space). Elements are converted to strings as by String.valueOf(long). Returns "null" if a is null.<br />Parameters:<br />a - the array whose string representation to return<br />Returns:<br />a string representation of a<br />Since:<br />1.5<br />toStringpublic static <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> toString(int[] a)<br />Returns a string representation of the contents of the specified array. The string representation consists of a list of the array's elements, enclosed in square brackets ("[]"). Adjacent elements are separated by the characters ", " (a comma followed by a space). Elements are converted to strings as by String.valueOf(int). Returns "null" if a is null.<br />Parameters:<br />a - the array whose string representation to return<br />Returns:<br />a string representation of a<br />Since:<br />1.5<br />toStringpublic static <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> toString(short[] a)<br />Returns a string representation of the contents of the specified array. The string representation consists of a list of the array's elements, enclosed in square brackets ("[]"). Adjacent elements are separated by the characters ", " (a comma followed by a space). Elements are converted to strings as by String.valueOf(short). Returns "null" if a is null.<br />Parameters:<br />a - the array whose string representation to return<br />Returns:<br />a string representation of a<br />Since:<br />1.5<br />toStringpublic static <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> toString(char[] a)<br />Returns a string representation of the contents of the specified array. The string representation consists of a list of the array's elements, enclosed in square brackets ("[]"). Adjacent elements are separated by the characters ", " (a comma followed by a space). Elements are converted to strings as by String.valueOf(char). Returns "null" if a is null.<br />Parameters:<br />a - the array whose string representation to return<br />Returns:<br />a string representation of a<br />Since:<br />1.5<br />toStringpublic static <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> toString(byte[] a)<br />Returns a string representation of the contents of the specified array. The string representation consists of a list of the array's elements, enclosed in square brackets ("[]"). Adjacent elements are separated by the characters ", " (a comma followed by a space). Elements are converted to strings as by String.valueOf(byte). Returns "null" if a is null.<br />Parameters:<br />a - the array whose string representation to return<br />Returns:<br />a string representation of a<br />Since:<br />1.5<br />toStringpublic static <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> toString(boolean[] a)<br />Returns a string representation of the contents of the specified array. The string representation consists of a list of the array's elements, enclosed in square brackets ("[]"). Adjacent elements are separated by the characters ", " (a comma followed by a space). Elements are converted to strings as by String.valueOf(boolean). Returns "null" if a is null.<br />Parameters:<br />a - the array whose string representation to return<br />Returns:<br />a string representation of a<br />Since:<br />1.5<br />toStringpublic static <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> toString(float[] a)<br />Returns a string representation of the contents of the specified array. The string representation consists of a list of the array's elements, enclosed in square brackets ("[]"). Adjacent elements are separated by the characters ", " (a comma followed by a space). Elements are converted to strings as by String.valueOf(float). Returns "null" if a is null.<br />Parameters:<br />a - the array whose string representation to return<br />Returns:<br />a string representation of a<br />Since:<br />1.5<br />toStringpublic static <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> toString(double[] a)<br />Returns a string representation of the contents of the specified array. The string representation consists of a list of the array's elements, enclosed in square brackets ("[]"). Adjacent elements are separated by the characters ", " (a comma followed by a space). Elements are converted to strings as by String.valueOf(double). Returns "null" if a is null.<br />Parameters:<br />a - the array whose string representation to return<br />Returns:<br />a string representation of a<br />Since:<br />1.5<br />toStringpublic static <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> toString(<a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html">Object</a>[] a)<br />Returns a string representation of the contents of the specified array. If the array contains other arrays as elements, they are converted to strings by the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html#toString()">Object.toString()</a> method inherited from Object, which describes their identities rather than their contents.<br />The value returned by this method is equal to the value that would be returned by Arrays.asList(a).toString(), unless a is null, in which case "null" is returned.<br />Parameters:<br />a - the array whose string representation to return<br />Returns:<br />a string representation of a<br />Since:<br />1.5<br />See Also:<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#deepToString(java.lang.Object[])">deepToString(Object[])</a><br />deepToStringpublic static <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> deepToString(<a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html">Object</a>[] a)<br />Returns a string representation of the "deep contents" of the specified array. If the array contains other arrays as elements, the string representation contains their contents and so on. This method is designed for converting multidimensional arrays to strings.<br />The string representation consists of a list of the array's elements, enclosed in square brackets ("[]"). Adjacent elements are separated by the characters ", " (a comma followed by a space). Elements are converted to strings as by String.valueOf(Object), unless they are themselves arrays.<br />If an element e is an array of a primitive type, it is converted to a string as by invoking the appropriate overloading of Arrays.toString(e). If an element e is an array of a reference type, it is converted to a string as by invoking this method recursively.<br />To avoid infinite recursion, if the specified array contains itself as an element, or contains an indirect reference to itself through one or more levels of arrays, the self-reference is converted to the string "[...]". For example, an array containing only a reference to itself would be rendered as "[[...]]".<br />This method returns "null" if the specified array is null.<br />Parameters:<br />a - the array whose string representation to return<br />Returns:<br />a string representation of a<br />Since:<br />1.5<br />See Also:<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilArrays.html#toString(java.lang.Object[])">toString(Object[])</a> <br />java.io Class File<a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html">java.lang.Object</a> <br /><br />java.io.File<br />All Implemented Interfaces:<br /><a title="interface in java.io" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioSerializable.html">Serializable</a>, <a title="interface in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangComparable.html">Comparable</a><<a title="class in java.io" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html">File</a>><br />public class Fileextends <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html">Object</a>implements <a title="interface in java.io" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioSerializable.html">Serializable</a>, <a title="interface in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangComparable.html">Comparable</a><<a title="class in java.io" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html">File</a>><br />An abstract representation of file and directory pathnames.<br />User interfaces and operating systems use system-dependent pathname strings to name files and directories. This class presents an abstract, system-independent view of hierarchical pathnames. An abstract pathname has two components:<br />1. An optional system-dependent prefix string, such as a disk-drive specifier, "/" for the UNIX root directory, or "\\\\" for a Microsoft Windows UNC pathname, and<br />2. A sequence of zero or more string names.<br />Each name in an abstract pathname except for the last denotes a directory; the last name may denote either a directory or a file. The empty abstract pathname has no prefix and an empty name sequence.<br />The conversion of a pathname string to or from an abstract pathname is inherently system-dependent. When an abstract pathname is converted into a pathname string, each name is separated from the next by a single copy of the default separator character. The default name-separator character is defined by the system property file.separator, and is made available in the public static fields <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#separator">separator</a> and <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#separatorChar">separatorChar</a> of this class. When a pathname string is converted into an abstract pathname, the names within it may be separated by the default name-separator character or by any other name-separator character that is supported by the underlying system.<br />A pathname, whether abstract or in string form, may be either absolute or relative. An absolute pathname is complete in that no other information is required in order to locate the file that it denotes. A relative pathname, in contrast, must be interpreted in terms of information taken from some other pathname. By default the classes in the java.io package always resolve relative pathnames against the current user directory. This directory is named by the system property user.dir, and is typically the directory in which the Java virtual machine was invoked.<br />The prefix concept is used to handle root directories on UNIX platforms, and drive specifiers, root directories and UNC pathnames on Microsoft Windows platforms, as follows:<br />For UNIX platforms, the prefix of an absolute pathname is always "/". Relative pathnames have no prefix. The abstract pathname denoting the root directory has the prefix "/" and an empty name sequence.<br />For Microsoft Windows platforms, the prefix of a pathname that contains a drive specifier consists of the drive letter followed by ":" and possibly followed by "\\" if the pathname is absolute. The prefix of a UNC pathname is "\\\\"; the hostname and the share name are the first two names in the name sequence. A relative pathname that does not specify a drive has no prefix.<br />Instances of the File class are immutable; that is, once created, the abstract pathname represented by a File object will never change.<br />Since:<br />JDK1.0<br />See Also:<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapiserialized-form.html#java.io.File">Serialized Form</a><br />Field Summary<br />static <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#pathSeparator">pathSeparator</a> The system-dependent path-separator character, represented as a string for convenience.<br />static char<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#pathSeparatorChar">pathSeparatorChar</a> The system-dependent path-separator character.<br />static <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#separator">separator</a> The system-dependent default name-separator character, represented as a string for convenience.<br />static char<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#separatorChar">separatorChar</a> The system-dependent default name-separator character.<br /> <br />Constructor Summary<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#File(java.io.File,">File</a>(<a title="class in java.io" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html">File</a> parent, <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> child) Creates a new File instance from a parent abstract pathname and a child pathname string.<br /><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#File(java.lang.String)">File</a>(<a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> pathname) Creates a new File instance by converting the given pathname string into an abstract pathname.<br /><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#File(java.lang.String,">File</a>(<a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> parent, <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> child) Creates a new File instance from a parent pathname string and a child pathname string.<br /><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#File(java.net.URI)">File</a>(<a title="class in java.net" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavanetURI.html">URI</a> uri) Creates a new File instance by converting the given file: URI into an abstract pathname.<br /><br /> <br />Method Summary<br /> boolean<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#canRead()">canRead</a>() Tests whether the application can read the file denoted by this abstract pathname.<br /> boolean<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#canWrite()">canWrite</a>() Tests whether the application can modify the file denoted by this abstract pathname.<br /> int<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#compareTo(java.io.File)">compareTo</a>(<a title="class in java.io" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html">File</a> pathname) Compares two abstract pathnames lexicographically.<br /> boolean<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#createNewFile()">createNewFile</a>() Atomically creates a new, empty file named by this abstract pathname if and only if a file with this name does not yet exist.<br />static <a title="class in java.io" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html">File</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#createTempFile(java.lang.String,">createTempFile</a>(<a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> prefix, <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> suffix) Creates an empty file in the default temporary-file directory, using the given prefix and suffix to generate its name.<br />static <a title="class in java.io" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html">File</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#createTempFile(java.lang.String,">createTempFile</a>(<a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> prefix, <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> suffix, <a title="class in java.io" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html">File</a> directory) Creates a new empty file in the specified directory, using the given prefix and suffix strings to generate its name.<br /> boolean<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#delete()">delete</a>() Deletes the file or directory denoted by this abstract pathname.<br /> void<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#deleteOnExit()">deleteOnExit</a>() Requests that the file or directory denoted by this abstract pathname be deleted when the virtual machine terminates.<br /> boolean<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#equals(java.lang.Object)">equals</a>(<a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html">Object</a> obj) Tests this abstract pathname for equality with the given object.<br /> boolean<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#exists()">exists</a>() Tests whether the file or directory denoted by this abstract pathname exists.<br /> <a title="class in java.io" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html">File</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#getAbsoluteFile()">getAbsoluteFile</a>() Returns the absolute form of this abstract pathname.<br /> <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#getAbsolutePath()">getAbsolutePath</a>() Returns the absolute pathname string of this abstract pathname.<br /> <a title="class in java.io" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html">File</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#getCanonicalFile()">getCanonicalFile</a>() Returns the canonical form of this abstract pathname.<br /> <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#getCanonicalPath()">getCanonicalPath</a>() Returns the canonical pathname string of this abstract pathname.<br /> <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#getName()">getName</a>() Returns the name of the file or directory denoted by this abstract pathname.<br /> <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#getParent()">getParent</a>() Returns the pathname string of this abstract pathname's parent, or null if this pathname does not name a parent directory.<br /> <a title="class in java.io" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html">File</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#getParentFile()">getParentFile</a>() Returns the abstract pathname of this abstract pathname's parent, or null if this pathname does not name a parent directory.<br /> <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#getPath()">getPath</a>() Converts this abstract pathname into a pathname string.<br /> int<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#hashCode()">hashCode</a>() Computes a hash code for this abstract pathname.<br /> boolean<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#isAbsolute()">isAbsolute</a>() Tests whether this abstract pathname is absolute.<br /> boolean<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#isDirectory()">isDirectory</a>() Tests whether the file denoted by this abstract pathname is a directory.<br /> boolean<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#isFile()">isFile</a>() Tests whether the file denoted by this abstract pathname is a normal file.<br /> boolean<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#isHidden()">isHidden</a>() Tests whether the file named by this abstract pathname is a hidden file.<br /> long<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#lastModified()">lastModified</a>() Returns the time that the file denoted by this abstract pathname was last modified.<br /> long<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#length()">length</a>() Returns the length of the file denoted by this abstract pathname.<br /> <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a>[]<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#list()">list</a>() Returns an array of strings naming the files and directories in the directory denoted by this abstract pathname.<br /> <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a>[]<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#list(java.io.FilenameFilter)">list</a>(<a title="interface in java.io" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFilenameFilter.html">FilenameFilter</a> filter) Returns an array of strings naming the files and directories in the directory denoted by this abstract pathname that satisfy the specified filter.<br /> <a title="class in java.io" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html">File</a>[]<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#listFiles()">listFiles</a>() Returns an array of abstract pathnames denoting the files in the directory denoted by this abstract pathname.<br /> <a title="class in java.io" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html">File</a>[]<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#listFiles(java.io.FileFilter)">listFiles</a>(<a title="interface in java.io" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFileFilter.html">FileFilter</a> filter) Returns an array of abstract pathnames denoting the files and directories in the directory denoted by this abstract pathname that satisfy the specified filter.<br /> <a title="class in java.io" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html">File</a>[]<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#listFiles(java.io.FilenameFilter)">listFiles</a>(<a title="interface in java.io" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFilenameFilter.html">FilenameFilter</a> filter) Returns an array of abstract pathnames denoting the files and directories in the directory denoted by this abstract pathname that satisfy the specified filter.<br />static <a title="class in java.io" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html">File</a>[]<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#listRoots()">listRoots</a>() List the available filesystem roots.<br /> boolean<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#mkdir()">mkdir</a>() Creates the directory named by this abstract pathname.<br /> boolean<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#mkdirs()">mkdirs</a>() Creates the directory named by this abstract pathname, including any necessary but nonexistent parent directories.<br /> boolean<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#renameTo(java.io.File)">renameTo</a>(<a title="class in java.io" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html">File</a> dest) Renames the file denoted by this abstract pathname.<br /> boolean<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#setLastModified(long)">setLastModified</a>(long time) Sets the last-modified time of the file or directory named by this abstract pathname.<br /> boolean<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#setReadOnly()">setReadOnly</a>() Marks the file or directory named by this abstract pathname so that only read operations are allowed.<br /> <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#toString()">toString</a>() Returns the pathname string of this abstract pathname.<br /> <a title="class in java.net" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavanetURI.html">URI</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#toURI()">toURI</a>() Constructs a file: URI that represents this abstract pathname.<br /> <a title="class in java.net" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavanetURL.html">URL</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#toURL()">toURL</a>() Converts this abstract pathname into a file: URL.<br /> <br />Methods inherited from class java.lang.<a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html">Object</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html#clone()">clone</a>, <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html#finalize()">finalize</a>, <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html#getClass()">getClass</a>, <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html#notify()">notify</a>, <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html#notifyAll()">notifyAll</a>, <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html#wait()">wait</a>, <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html#wait(long)">wait</a>, <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html#wait(long,">wait</a><br /> <br />Field Detail<br />separatorCharpublic static final char separatorChar<br />The system-dependent default name-separator character. This field is initialized to contain the first character of the value of the system property file.separator. On UNIX systems the value of this field is '/'; on Microsoft Windows systems it is '\\'.<br />See Also:<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangSystem.html#getProperty(java.lang.String)">System.getProperty(java.lang.String)</a><br />separatorpublic static final <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> separator<br />The system-dependent default name-separator character, represented as a string for convenience. This string contains a single character, namely <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#separatorChar">separatorChar</a>.<br />pathSeparatorCharpublic static final char pathSeparatorChar<br />The system-dependent path-separator character. This field is initialized to contain the first character of the value of the system property path.separator. This character is used to separate filenames in a sequence of files given as a path list. On UNIX systems, this character is ':'; on Microsoft Windows systems it is ';'.<br />See Also:<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangSystem.html#getProperty(java.lang.String)">System.getProperty(java.lang.String)</a><br />pathSeparatorpublic static final <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> pathSeparator<br />The system-dependent path-separator character, represented as a string for convenience. This string contains a single character, namely <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#pathSeparatorChar">pathSeparatorChar</a>.<br />Constructor Detail<br />Filepublic File(<a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> pathname)<br />Creates a new File instance by converting the given pathname string into an abstract pathname. If the given string is the empty string, then the result is the empty abstract pathname.<br />Parameters:<br />pathname - A pathname string<br />Throws:<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangNullPointerException.html">NullPointerException</a> - If the pathname argument is null<br />Filepublic File(<a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> parent, <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> child)<br />Creates a new File instance from a parent pathname string and a child pathname string.<br />If parent is null then the new File instance is created as if by invoking the single-argument File constructor on the given child pathname string.<br />Otherwise the parent pathname string is taken to denote a directory, and the child pathname string is taken to denote either a directory or a file. If the child pathname string is absolute then it is converted into a relative pathname in a system-dependent way. If parent is the empty string then the new File instance is created by converting child into an abstract pathname and resolving the result against a system-dependent default directory. Otherwise each pathname string is converted into an abstract pathname and the child abstract pathname is resolved against the parent.<br />Parameters:<br />parent - The parent pathname string<br />child - The child pathname string<br />Throws:<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangNullPointerException.html">NullPointerException</a> - If child is null<br />Filepublic File(<a title="class in java.io" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html">File</a> parent, <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> child)<br />Creates a new File instance from a parent abstract pathname and a child pathname string.<br />If parent is null then the new File instance is created as if by invoking the single-argument File constructor on the given child pathname string.<br />Otherwise the parent abstract pathname is taken to denote a directory, and the child pathname string is taken to denote either a directory or a file. If the child pathname string is absolute then it is converted into a relative pathname in a system-dependent way. If parent is the empty abstract pathname then the new File instance is created by converting child into an abstract pathname and resolving the result against a system-dependent default directory. Otherwise each pathname string is converted into an abstract pathname and the child abstract pathname is resolved against the parent.<br />Parameters:<br />parent - The parent abstract pathname<br />child - The child pathname string<br />Throws:<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangNullPointerException.html">NullPointerException</a> - If child is null<br />Filepublic File(<a title="class in java.net" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavanetURI.html">URI</a> uri)<br />Creates a new File instance by converting the given file: URI into an abstract pathname.<br />The exact form of a file: URI is system-dependent, hence the transformation performed by this constructor is also system-dependent.<br />For a given abstract pathname f it is guaranteed that<br />new File( f.<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#toURI()">toURI</a>()).equals( f.<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#getAbsoluteFile()">getAbsoluteFile</a>())<br />so long as the original abstract pathname, the URI, and the new abstract pathname are all created in (possibly different invocations of) the same Java virtual machine. This relationship typically does not hold, however, when a file: URI that is created in a virtual machine on one operating system is converted into an abstract pathname in a virtual machine on a different operating system.<br />Parameters:<br />uri - An absolute, hierarchical URI with a scheme equal to "file", a non-empty path component, and undefined authority, query, and fragment components<br />Throws:<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangNullPointerException.html">NullPointerException</a> - If uri is null<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangIllegalArgumentException.html">IllegalArgumentException</a> - If the preconditions on the parameter do not hold<br />Since:<br />1.4<br />See Also:<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#toURI()">toURI()</a>, <a title="class in java.net" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavanetURI.html">URI</a><br />Method Detail<br />getNamepublic <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> getName()<br />Returns the name of the file or directory denoted by this abstract pathname. This is just the last name in the pathname's name sequence. If the pathname's name sequence is empty, then the empty string is returned.<br />Returns:<br />The name of the file or directory denoted by this abstract pathname, or the empty string if this pathname's name sequence is empty<br />getParentpublic <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> getParent()<br />Returns the pathname string of this abstract pathname's parent, or null if this pathname does not name a parent directory.<br />The parent of an abstract pathname consists of the pathname's prefix, if any, and each name in the pathname's name sequence except for the last. If the name sequence is empty then the pathname does not name a parent directory.<br />Returns:<br />The pathname string of the parent directory named by this abstract pathname, or null if this pathname does not name a parent<br />getParentFilepublic <a title="class in java.io" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html">File</a> getParentFile()<br />Returns the abstract pathname of this abstract pathname's parent, or null if this pathname does not name a parent directory.<br />The parent of an abstract pathname consists of the pathname's prefix, if any, and each name in the pathname's name sequence except for the last. If the name sequence is empty then the pathname does not name a parent directory.<br />Returns:<br />The abstract pathname of the parent directory named by this abstract pathname, or null if this pathname does not name a parent<br />Since:<br />1.2<br />getPathpublic <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> getPath()<br />Converts this abstract pathname into a pathname string. The resulting string uses the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#separator">default name-separator character</a> to separate the names in the name sequence.<br />Returns:<br />The string form of this abstract pathname<br />isAbsolutepublic boolean isAbsolute()<br />Tests whether this abstract pathname is absolute. The definition of absolute pathname is system dependent. On UNIX systems, a pathname is absolute if its prefix is "/". On Microsoft Windows systems, a pathname is absolute if its prefix is a drive specifier followed by "\\", or if its prefix is "\\\\".<br />Returns:<br />true if this abstract pathname is absolute, false otherwise<br />getAbsolutePathpublic <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> getAbsolutePath()<br />Returns the absolute pathname string of this abstract pathname.<br />If this abstract pathname is already absolute, then the pathname string is simply returned as if by the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#getPath()">getPath()</a> method. If this abstract pathname is the empty abstract pathname then the pathname string of the current user directory, which is named by the system property user.dir, is returned. Otherwise this pathname is resolved in a system-dependent way. On UNIX systems, a relative pathname is made absolute by resolving it against the current user directory. On Microsoft Windows systems, a relative pathname is made absolute by resolving it against the current directory of the drive named by the pathname, if any; if not, it is resolved against the current user directory.<br />Returns:<br />The absolute pathname string denoting the same file or directory as this abstract pathname<br />Throws:<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangSecurityException.html">SecurityException</a> - If a required system property value cannot be accessed.<br />See Also:<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#isAbsolute()">isAbsolute()</a><br />getAbsoluteFilepublic <a title="class in java.io" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html">File</a> getAbsoluteFile()<br />Returns the absolute form of this abstract pathname. Equivalent to new File(this.<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#getAbsolutePath()">getAbsolutePath()</a>()).<br />Returns:<br />The absolute abstract pathname denoting the same file or directory as this abstract pathname<br />Throws:<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangSecurityException.html">SecurityException</a> - If a required system property value cannot be accessed.<br />Since:<br />1.2<br />getCanonicalPathpublic <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> getCanonicalPath() throws <a title="class in java.io" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioIOException.html">IOException</a><br />Returns the canonical pathname string of this abstract pathname.<br />A canonical pathname is both absolute and unique. The precise definition of canonical form is system-dependent. This method first converts this pathname to absolute form if necessary, as if by invoking the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#getAbsolutePath()">getAbsolutePath()</a> method, and then maps it to its unique form in a system-dependent way. This typically involves removing redundant names such as "." and ".." from the pathname, resolving symbolic links (on UNIX platforms), and converting drive letters to a standard case (on Microsoft Windows platforms).<br />Every pathname that denotes an existing file or directory has a unique canonical form. Every pathname that denotes a nonexistent file or directory also has a unique canonical form. The canonical form of the pathname of a nonexistent file or directory may be different from the canonical form of the same pathname after the file or directory is created. Similarly, the canonical form of the pathname of an existing file or directory may be different from the canonical form of the same pathname after the file or directory is deleted.<br />Returns:<br />The canonical pathname string denoting the same file or directory as this abstract pathname<br />Throws:<br /><a title="class in java.io" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioIOException.html">IOException</a> - If an I/O error occurs, which is possible because the construction of the canonical pathname may require filesystem queries<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangSecurityException.html">SecurityException</a> - If a required system property value cannot be accessed, or if a security manager exists and its <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangSecurityManager.html#checkRead(java.io.FileDescriptor)">SecurityManager.checkRead(java.io.FileDescriptor)</a> method denies read access to the file<br />Since:<br />JDK1.1<br />getCanonicalFilepublic <a title="class in java.io" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html">File</a> getCanonicalFile() throws <a title="class in java.io" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioIOException.html">IOException</a><br />Returns the canonical form of this abstract pathname. Equivalent to new File(this.<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#getCanonicalPath()">getCanonicalPath()</a>()).<br />Returns:<br />The canonical pathname string denoting the same file or directory as this abstract pathname<br />Throws:<br /><a title="class in java.io" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioIOException.html">IOException</a> - If an I/O error occurs, which is possible because the construction of the canonical pathname may require filesystem queries<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangSecurityException.html">SecurityException</a> - If a required system property value cannot be accessed, or if a security manager exists and its <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangSecurityManager.html#checkRead(java.io.FileDescriptor)">SecurityManager.checkRead(java.io.FileDescriptor)</a> method denies read access to the file<br />Since:<br />1.2<br />toURLpublic <a title="class in java.net" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavanetURL.html">URL</a> toURL() throws <a title="class in java.net" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavanetMalformedURLException.html">MalformedURLException</a><br />Converts this abstract pathname into a file: URL. The exact form of the URL is system-dependent. If it can be determined that the file denoted by this abstract pathname is a directory, then the resulting URL will end with a slash.<br />Usage note: This method does not automatically escape characters that are illegal in URLs. It is recommended that new code convert an abstract pathname into a URL by first converting it into a URI, via the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#toURI()">toURI</a> method, and then converting the URI into a URL via the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavanetURI.html#toURL()">URI.toURL</a> method.<br />Returns:<br />A URL object representing the equivalent file URL<br />Throws:<br /><a title="class in java.net" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavanetMalformedURLException.html">MalformedURLException</a> - If the path cannot be parsed as a URL<br />Since:<br />1.2<br />See Also:<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#toURI()">toURI()</a>, <a title="class in java.net" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavanetURI.html">URI</a>, <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavanetURI.html#toURL()">URI.toURL()</a>, <a title="class in java.net" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavanetURL.html">URL</a><br />toURIpublic <a title="class in java.net" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavanetURI.html">URI</a> toURI()<br />Constructs a file: URI that represents this abstract pathname.<br />The exact form of the URI is system-dependent. If it can be determined that the file denoted by this abstract pathname is a directory, then the resulting URI will end with a slash.<br />For a given abstract pathname f, it is guaranteed that<br />new <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#File(java.net.URI)">File</a>( f.toURI()).equals( f.<a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#getAbsoluteFile()">getAbsoluteFile</a>())<br />so long as the original abstract pathname, the URI, and the new abstract pathname are all created in (possibly different invocations of) the same Java virtual machine. Due to the system-dependent nature of abstract pathnames, however, this relationship typically does not hold when a file: URI that is created in a virtual machine on one operating system is converted into an abstract pathname in a virtual machine on a different operating system.<br />Returns:<br />An absolute, hierarchical URI with a scheme equal to "file", a path representing this abstract pathname, and undefined authority, query, and fragment components<br />Since:<br />1.4<br />See Also:<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#File(java.net.URI)">File(java.net.URI)</a>, <a title="class in java.net" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavanetURI.html">URI</a>, <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavanetURI.html#toURL()">URI.toURL()</a><br />canReadpublic boolean canRead()<br />Tests whether the application can read the file denoted by this abstract pathname.<br />Returns:<br />true if and only if the file specified by this abstract pathname exists and can be read by the application; false otherwise<br />Throws:<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangSecurityException.html">SecurityException</a> - If a security manager exists and its <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangSecurityManager.html#checkRead(java.lang.String)">SecurityManager.checkRead(java.lang.String)</a> method denies read access to the file<br />canWritepublic boolean canWrite()<br />Tests whether the application can modify the file denoted by this abstract pathname.<br />Returns:<br />true if and only if the file system actually contains a file denoted by this abstract pathname and the application is allowed to write to the file; false otherwise.<br />Throws:<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangSecurityException.html">SecurityException</a> - If a security manager exists and its <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangSecurityManager.html#checkWrite(java.lang.String)">SecurityManager.checkWrite(java.lang.String)</a> method denies write access to the file<br />existspublic boolean exists()<br />Tests whether the file or directory denoted by this abstract pathname exists.<br />Returns:<br />true if and only if the file or directory denoted by this abstract pathname exists; false otherwise<br />Throws:<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangSecurityException.html">SecurityException</a> - If a security manager exists and its <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangSecurityManager.html#checkRead(java.lang.String)">SecurityManager.checkRead(java.lang.String)</a> method denies read access to the file or directory<br />isDirectorypublic boolean isDirectory()<br />Tests whether the file denoted by this abstract pathname is a directory.<br />Returns:<br />true if and only if the file denoted by this abstract pathname exists and is a directory; false otherwise<br />Throws:<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangSecurityException.html">SecurityException</a> - If a security manager exists and its <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangSecurityManager.html#checkRead(java.lang.String)">SecurityManager.checkRead(java.lang.String)</a> method denies read access to the file<br />isFilepublic boolean isFile()<br />Tests whether the file denoted by this abstract pathname is a normal file. A file is normal if it is not a directory and, in addition, satisfies other system-dependent criteria. Any non-directory file created by a Java application is guaranteed to be a normal file.<br />Returns:<br />true if and only if the file denoted by this abstract pathname exists and is a normal file; false otherwise<br />Throws:<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangSecurityException.html">SecurityException</a> - If a security manager exists and its <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangSecurityManager.html#checkRead(java.lang.String)">SecurityManager.checkRead(java.lang.String)</a> method denies read access to the file<br />isHiddenpublic boolean isHidden()<br />Tests whether the file named by this abstract pathname is a hidden file. The exact definition of hidden is system-dependent. On UNIX systems, a file is considered to be hidden if its name begins with a period character ('.'). On Microsoft Windows systems, a file is considered to be hidden if it has been marked as such in the filesystem.<br />Returns:<br />true if and only if the file denoted by this abstract pathname is hidden according to the conventions of the underlying platform<br />Throws:<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangSecurityException.html">SecurityException</a> - If a security manager exists and its <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangSecurityManager.html#checkRead(java.lang.String)">SecurityManager.checkRead(java.lang.String)</a> method denies read access to the file<br />Since:<br />1.2<br />lastModifiedpublic long lastModified()<br />Returns the time that the file denoted by this abstract pathname was last modified.<br />Returns:<br />A long value representing the time the file was last modified, measured in milliseconds since the epoch (00:00:00 GMT, January 1, 1970), or 0L if the file does not exist or if an I/O error occurs<br />Throws:<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangSecurityException.html">SecurityException</a> - If a security manager exists and its <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangSecurityManager.html#checkRead(java.lang.String)">SecurityManager.checkRead(java.lang.String)</a> method denies read access to the file<br />lengthpublic long length()<br />Returns the length of the file denoted by this abstract pathname. The return value is unspecified if this pathname denotes a directory.<br />Returns:<br />The length, in bytes, of the file denoted by this abstract pathname, or 0L if the file does not exist<br />Throws:<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangSecurityException.html">SecurityException</a> - If a security manager exists and its <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangSecurityManager.html#checkRead(java.lang.String)">SecurityManager.checkRead(java.lang.String)</a> method denies read access to the file<br />createNewFilepublic boolean createNewFile() throws <a title="class in java.io" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioIOException.html">IOException</a><br />Atomically creates a new, empty file named by this abstract pathname if and only if a file with this name does not yet exist. The check for the existence of the file and the creation of the file if it does not exist are a single operation that is atomic with respect to all other filesystem activities that might affect the file.<br />Note: this method should not be used for file-locking, as the resulting protocol cannot be made to work reliably. The <a title="class in java.nio.channels" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaniochannelsFileLock.html">FileLock</a> facility should be used instead.<br />Returns:<br />true if the named file does not exist and was successfully created; false if the named file already exists<br />Throws:<br /><a title="class in java.io" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioIOException.html">IOException</a> - If an I/O error occurred<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangSecurityException.html">SecurityException</a> - If a security manager exists and its <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangSecurityManager.html#checkWrite(java.lang.String)">SecurityManager.checkWrite(java.lang.String)</a> method denies write access to the file<br />Since:<br />1.2<br />deletepublic boolean delete()<br />Deletes the file or directory denoted by this abstract pathname. If this pathname denotes a directory, then the directory must be empty in order to be deleted.<br />Returns:<br />true if and only if the file or directory is successfully deleted; false otherwise<br />Throws:<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangSecurityException.html">SecurityException</a> - If a security manager exists and its <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangSecurityManager.html#checkDelete(java.lang.String)">SecurityManager.checkDelete(java.lang.String)</a> method denies delete access to the file<br />deleteOnExitpublic void deleteOnExit()<br />Requests that the file or directory denoted by this abstract pathname be deleted when the virtual machine terminates. Deletion will be attempted only for normal termination of the virtual machine, as defined by the Java Language Specification.<br />Once deletion has been requested, it is not possible to cancel the request. This method should therefore be used with care.<br />Note: this method should not be used for file-locking, as the resulting protocol cannot be made to work reliably. The <a title="class in java.nio.channels" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaniochannelsFileLock.html">FileLock</a> facility should be used instead.<br />Throws:<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangSecurityException.html">SecurityException</a> - If a security manager exists and its <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangSecurityManager.html#checkDelete(java.lang.String)">SecurityManager.checkDelete(java.lang.String)</a> method denies delete access to the file<br />Since:<br />1.2<br />See Also:<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#delete()">delete()</a><br />listpublic <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a>[] list()<br />Returns an array of strings naming the files and directories in the directory denoted by this abstract pathname.<br />If this abstract pathname does not denote a directory, then this method returns null. Otherwise an array of strings is returned, one for each file or directory in the directory. Names denoting the directory itself and the directory's parent directory are not included in the result. Each string is a file name rather than a complete path.<br />There is no guarantee that the name strings in the resulting array will appear in any specific order; they are not, in particular, guaranteed to appear in alphabetical order.<br />Returns:<br />An array of strings naming the files and directories in the directory denoted by this abstract pathname. The array will be empty if the directory is empty. Returns null if this abstract pathname does not denote a directory, or if an I/O error occurs.<br />Throws:<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangSecurityException.html">SecurityException</a> - If a security manager exists and its <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangSecurityManager.html#checkRead(java.lang.String)">SecurityManager.checkRead(java.lang.String)</a> method denies read access to the directory<br />listpublic <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a>[] list(<a title="interface in java.io" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFilenameFilter.html">FilenameFilter</a> filter)<br />Returns an array of strings naming the files and directories in the directory denoted by this abstract pathname that satisfy the specified filter. The behavior of this method is the same as that of the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#list()">list()</a> method, except that the strings in the returned array must satisfy the filter. If the given filter is null then all names are accepted. Otherwise, a name satisfies the filter if and only if the value true results when the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFilenameFilter.html#accept(java.io.File,">FilenameFilter.accept(java.io.File, java.lang.String)</a> method of the filter is invoked on this abstract pathname and the name of a file or directory in the directory that it denotes.<br />Parameters:<br />filter - A filename filter<br />Returns:<br />An array of strings naming the files and directories in the directory denoted by this abstract pathname that were accepted by the given filter. The array will be empty if the directory is empty or if no names were accepted by the filter. Returns null if this abstract pathname does not denote a directory, or if an I/O error occurs.<br />Throws:<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangSecurityException.html">SecurityException</a> - If a security manager exists and its <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangSecurityManager.html#checkRead(java.lang.String)">SecurityManager.checkRead(java.lang.String)</a> method denies read access to the directory<br />listFilespublic <a title="class in java.io" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html">File</a>[] listFiles()<br />Returns an array of abstract pathnames denoting the files in the directory denoted by this abstract pathname.<br />If this abstract pathname does not denote a directory, then this method returns null. Otherwise an array of File objects is returned, one for each file or directory in the directory. Pathnames denoting the directory itself and the directory's parent directory are not included in the result. Each resulting abstract pathname is constructed from this abstract pathname using the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#File(java.io.File,">File(File, String)</a> constructor. Therefore if this pathname is absolute then each resulting pathname is absolute; if this pathname is relative then each resulting pathname will be relative to the same directory.<br />There is no guarantee that the name strings in the resulting array will appear in any specific order; they are not, in particular, guaranteed to appear in alphabetical order.<br />Returns:<br />An array of abstract pathnames denoting the files and directories in the directory denoted by this abstract pathname. The array will be empty if the directory is empty. Returns null if this abstract pathname does not denote a directory, or if an I/O error occurs.<br />Throws:<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangSecurityException.html">SecurityException</a> - If a security manager exists and its <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangSecurityManager.html#checkRead(java.lang.String)">SecurityManager.checkRead(java.lang.String)</a> method denies read access to the directory<br />Since:<br />1.2<br />listFilespublic <a title="class in java.io" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html">File</a>[] listFiles(<a title="interface in java.io" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFilenameFilter.html">FilenameFilter</a> filter)<br />Returns an array of abstract pathnames denoting the files and directories in the directory denoted by this abstract pathname that satisfy the specified filter. The behavior of this method is the same as that of the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#listFiles()">listFiles()</a> method, except that the pathnames in the returned array must satisfy the filter. If the given filter is null then all pathnames are accepted. Otherwise, a pathname satisfies the filter if and only if the value true results when the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFilenameFilter.html#accept(java.io.File,">FilenameFilter.accept(java.io.File, java.lang.String)</a> method of the filter is invoked on this abstract pathname and the name of a file or directory in the directory that it denotes.<br />Parameters:<br />filter - A filename filter<br />Returns:<br />An array of abstract pathnames denoting the files and directories in the directory denoted by this abstract pathname. The array will be empty if the directory is empty. Returns null if this abstract pathname does not denote a directory, or if an I/O error occurs.<br />Throws:<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangSecurityException.html">SecurityException</a> - If a security manager exists and its <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangSecurityManager.html#checkRead(java.lang.String)">SecurityManager.checkRead(java.lang.String)</a> method denies read access to the directory<br />Since:<br />1.2<br />listFilespublic <a title="class in java.io" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html">File</a>[] listFiles(<a title="interface in java.io" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFileFilter.html">FileFilter</a> filter)<br />Returns an array of abstract pathnames denoting the files and directories in the directory denoted by this abstract pathname that satisfy the specified filter. The behavior of this method is the same as that of the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#listFiles()">listFiles()</a> method, except that the pathnames in the returned array must satisfy the filter. If the given filter is null then all pathnames are accepted. Otherwise, a pathname satisfies the filter if and only if the value true results when the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFileFilter.html#accept(java.io.File)">FileFilter.accept(java.io.File)</a> method of the filter is invoked on the pathname.<br />Parameters:<br />filter - A file filter<br />Returns:<br />An array of abstract pathnames denoting the files and directories in the directory denoted by this abstract pathname. The array will be empty if the directory is empty. Returns null if this abstract pathname does not denote a directory, or if an I/O error occurs.<br />Throws:<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangSecurityException.html">SecurityException</a> - If a security manager exists and its <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangSecurityManager.html#checkRead(java.lang.String)">SecurityManager.checkRead(java.lang.String)</a> method denies read access to the directory<br />Since:<br />1.2<br />mkdirpublic boolean mkdir()<br />Creates the directory named by this abstract pathname.<br />Returns:<br />true if and only if the directory was created; false otherwise<br />Throws:<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangSecurityException.html">SecurityException</a> - If a security manager exists and its <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangSecurityManager.html#checkWrite(java.lang.String)">SecurityManager.checkWrite(java.lang.String)</a> method does not permit the named directory to be created<br />mkdirspublic boolean mkdirs()<br />Creates the directory named by this abstract pathname, including any necessary but nonexistent parent directories. Note that if this operation fails it may have succeeded in creating some of the necessary parent directories.<br />Returns:<br />true if and only if the directory was created, along with all necessary parent directories; false otherwise<br />Throws:<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangSecurityException.html">SecurityException</a> - If a security manager exists and its <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangSecurityManager.html#checkRead(java.lang.String)">SecurityManager.checkRead(java.lang.String)</a> method does not permit verification of the existence of the named directory and all necessary parent directories; or if the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangSecurityManager.html#checkWrite(java.lang.String)">SecurityManager.checkWrite(java.lang.String)</a> method does not permit the named directory and all necessary parent directories to be created<br />renameTopublic boolean renameTo(<a title="class in java.io" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html">File</a> dest)<br />Renames the file denoted by this abstract pathname.<br />Many aspects of the behavior of this method are inherently platform-dependent: The rename operation might not be able to move a file from one filesystem to another, it might not be atomic, and it might not succeed if a file with the destination abstract pathname already exists. The return value should always be checked to make sure that the rename operation was successful.<br />Parameters:<br />dest - The new abstract pathname for the named file<br />Returns:<br />true if and only if the renaming succeeded; false otherwise<br />Throws:<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangSecurityException.html">SecurityException</a> - If a security manager exists and its <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangSecurityManager.html#checkWrite(java.lang.String)">SecurityManager.checkWrite(java.lang.String)</a> method denies write access to either the old or new pathnames<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangNullPointerException.html">NullPointerException</a> - If parameter dest is null<br />setLastModifiedpublic boolean setLastModified(long time)<br />Sets the last-modified time of the file or directory named by this abstract pathname.<br />All platforms support file-modification times to the nearest second, but some provide more precision. The argument will be truncated to fit the supported precision. If the operation succeeds and no intervening operations on the file take place, then the next invocation of the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#lastModified()">lastModified()</a> method will return the (possibly truncated) time argument that was passed to this method.<br />Parameters:<br />time - The new last-modified time, measured in milliseconds since the epoch (00:00:00 GMT, January 1, 1970)<br />Returns:<br />true if and only if the operation succeeded; false otherwise<br />Throws:<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangIllegalArgumentException.html">IllegalArgumentException</a> - If the argument is negative<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangSecurityException.html">SecurityException</a> - If a security manager exists and its <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangSecurityManager.html#checkWrite(java.lang.String)">SecurityManager.checkWrite(java.lang.String)</a> method denies write access to the named file<br />Since:<br />1.2<br />setReadOnlypublic boolean setReadOnly()<br />Marks the file or directory named by this abstract pathname so that only read operations are allowed. After invoking this method the file or directory is guaranteed not to change until it is either deleted or marked to allow write access. Whether or not a read-only file or directory may be deleted depends upon the underlying system.<br />Returns:<br />true if and only if the operation succeeded; false otherwise<br />Throws:<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangSecurityException.html">SecurityException</a> - If a security manager exists and its <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangSecurityManager.html#checkWrite(java.lang.String)">SecurityManager.checkWrite(java.lang.String)</a> method denies write access to the named file<br />Since:<br />1.2<br />listRootspublic static <a title="class in java.io" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html">File</a>[] listRoots()<br />List the available filesystem roots.<br />A particular Java platform may support zero or more hierarchically-organized file systems. Each file system has a root directory from which all other files in that file system can be reached. Windows platforms, for example, have a root directory for each active drive; UNIX platforms have a single root directory, namely "/". The set of available filesystem roots is affected by various system-level operations such as the insertion or ejection of removable media and the disconnecting or unmounting of physical or virtual disk drives.<br />This method returns an array of File objects that denote the root directories of the available filesystem roots. It is guaranteed that the canonical pathname of any file physically present on the local machine will begin with one of the roots returned by this method.<br />The canonical pathname of a file that resides on some other machine and is accessed via a remote-filesystem protocol such as SMB or NFS may or may not begin with one of the roots returned by this method. If the pathname of a remote file is syntactically indistinguishable from the pathname of a local file then it will begin with one of the roots returned by this method. Thus, for example, File objects denoting the root directories of the mapped network drives of a Windows platform will be returned by this method, while File objects containing UNC pathnames will not be returned by this method.<br />Unlike most methods in this class, this method does not throw security exceptions. If a security manager exists and its <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangSecurityManager.html#checkRead(java.lang.String)">SecurityManager.checkRead(java.lang.String)</a> method denies read access to a particular root directory, then that directory will not appear in the result.<br />Returns:<br />An array of File objects denoting the available filesystem roots, or null if the set of roots could not be determined. The array will be empty if there are no filesystem roots.<br />Since:<br />1.2<br />createTempFilepublic static <a title="class in java.io" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html">File</a> createTempFile(<a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> prefix, <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> suffix, <a title="class in java.io" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html">File</a> directory) throws <a title="class in java.io" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioIOException.html">IOException</a><br />Creates a new empty file in the specified directory, using the given prefix and suffix strings to generate its name. If this method returns successfully then it is guaranteed that:<br />1. The file denoted by the returned abstract pathname did not exist before this method was invoked, and<br />2. Neither this method nor any of its variants will return the same abstract pathname again in the current invocation of the virtual machine.<br />This method provides only part of a temporary-file facility. To arrange for a file created by this method to be deleted automatically, use the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#deleteOnExit()">deleteOnExit()</a> method.<br />The prefix argument must be at least three characters long. It is recommended that the prefix be a short, meaningful string such as "hjb" or "mail". The suffix argument may be null, in which case the suffix ".tmp" will be used.<br />To create the new file, the prefix and the suffix may first be adjusted to fit the limitations of the underlying platform. If the prefix is too long then it will be truncated, but its first three characters will always be preserved. If the suffix is too long then it too will be truncated, but if it begins with a period character ('.') then the period and the first three characters following it will always be preserved. Once these adjustments have been made the name of the new file will be generated by concatenating the prefix, five or more internally-generated characters, and the suffix.<br />If the directory argument is null then the system-dependent default temporary-file directory will be used. The default temporary-file directory is specified by the system property java.io.tmpdir. On UNIX systems the default value of this property is typically "/tmp" or "/var/tmp"; on Microsoft Windows systems it is typically "C:\\WINNT\\TEMP". A different value may be given to this system property when the Java virtual machine is invoked, but programmatic changes to this property are not guaranteed to have any effect upon the temporary directory used by this method.<br />Parameters:<br />prefix - The prefix string to be used in generating the file's name; must be at least three characters long<br />suffix - The suffix string to be used in generating the file's name; may be null, in which case the suffix ".tmp" will be used<br />directory - The directory in which the file is to be created, or null if the default temporary-file directory is to be used<br />Returns:<br />An abstract pathname denoting a newly-created empty file<br />Throws:<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangIllegalArgumentException.html">IllegalArgumentException</a> - If the prefix argument contains fewer than three characters<br /><a title="class in java.io" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioIOException.html">IOException</a> - If a file could not be created<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangSecurityException.html">SecurityException</a> - If a security manager exists and its <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangSecurityManager.html#checkWrite(java.lang.String)">SecurityManager.checkWrite(java.lang.String)</a> method does not allow a file to be created<br />Since:<br />1.2<br />createTempFilepublic static <a title="class in java.io" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html">File</a> createTempFile(<a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> prefix, <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> suffix) throws <a title="class in java.io" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioIOException.html">IOException</a><br />Creates an empty file in the default temporary-file directory, using the given prefix and suffix to generate its name. Invoking this method is equivalent to invoking <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#createTempFile(java.lang.String,">createTempFile(prefix, suffix, null)</a>.<br />Parameters:<br />prefix - The prefix string to be used in generating the file's name; must be at least three characters long<br />suffix - The suffix string to be used in generating the file's name; may be null, in which case the suffix ".tmp" will be used<br />Returns:<br />An abstract pathname denoting a newly-created empty file<br />Throws:<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangIllegalArgumentException.html">IllegalArgumentException</a> - If the prefix argument contains fewer than three characters<br /><a title="class in java.io" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioIOException.html">IOException</a> - If a file could not be created<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangSecurityException.html">SecurityException</a> - If a security manager exists and its <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangSecurityManager.html#checkWrite(java.lang.String)">SecurityManager.checkWrite(java.lang.String)</a> method does not allow a file to be created<br />Since:<br />1.2<br />compareTopublic int compareTo(<a title="class in java.io" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html">File</a> pathname)<br />Compares two abstract pathnames lexicographically. The ordering defined by this method depends upon the underlying system. On UNIX systems, alphabetic case is significant in comparing pathnames; on Microsoft Windows systems it is not.<br />Specified by:<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangComparable.html#compareTo(T)">compareTo</a> in interface <a title="interface in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangComparable.html">Comparable</a><<a title="class in java.io" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html">File</a>><br />Parameters:<br />pathname - The abstract pathname to be compared to this abstract pathname<br />Returns:<br />Zero if the argument is equal to this abstract pathname, a value less than zero if this abstract pathname is lexicographically less than the argument, or a value greater than zero if this abstract pathname is lexicographically greater than the argument<br />Since:<br />1.2<br />equalspublic boolean equals(<a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html">Object</a> obj)<br />Tests this abstract pathname for equality with the given object. Returns true if and only if the argument is not null and is an abstract pathname that denotes the same file or directory as this abstract pathname. Whether or not two abstract pathnames are equal depends upon the underlying system. On UNIX systems, alphabetic case is significant in comparing pathnames; on Microsoft Windows systems it is not.<br />Overrides:<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html#equals(java.lang.Object)">equals</a> in class <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html">Object</a><br />Parameters:<br />obj - The object to be compared with this abstract pathname<br />Returns:<br />true if and only if the objects are the same; false otherwise<br />See Also:<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html#hashCode()">Object.hashCode()</a>, <a title="class in java.util" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilHashtable.html">Hashtable</a><br />hashCodepublic int hashCode()<br />Computes a hash code for this abstract pathname. Because equality of abstract pathnames is inherently system-dependent, so is the computation of their hash codes. On UNIX systems, the hash code of an abstract pathname is equal to the exclusive or of the hash code of its pathname string and the decimal value 1234321. On Microsoft Windows systems, the hash code is equal to the exclusive or of the hash code of its pathname string converted to lower case and the decimal value 1234321.<br />Overrides:<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html#hashCode()">hashCode</a> in class <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html">Object</a><br />Returns:<br />A hash code for this abstract pathname<br />See Also:<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html#equals(java.lang.Object)">Object.equals(java.lang.Object)</a>, <a title="class in java.util" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilHashtable.html">Hashtable</a><br />toStringpublic <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> toString()<br />Returns the pathname string of this abstract pathname. This is just the string returned by the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioFile.html#getPath()">getPath()</a> method.<br />Overrides:<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html#toString()">toString</a> in class <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html">Object</a><br />Returns:<br />The string form of this abstract pathname <br />java - the Java application launcher<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">Synopsis</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">Description</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">Options</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">See Also</a><br />SYNOPSIS java [ options ] class [ argument ... ] java [ options ] -jar file.jar [ argument ... ] javaw [ options ] class [ argument ... ] javaw [ options ] -jar file.jar [ argument ... ]<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">options</a><br />Command-line options.<br />class<br />Name of the class to be invoked.<br />file.jar<br />Name of the jar file to be invoked. Used only with <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">-jar</a>.<br />argument<br />Argument passed to the main function.<br />DESCRIPTION<br />The java tool launches a Java application. It does this by starting a Java runtime environment, loading a specified class, and invoking that class's main method.<br />The method must be declared public and static, it must not return any value, and it must accept a String array as a para meter. The method declaration must look like the following: public static void main(String args[])<br />By default, the first non-option argument is the name of the class to be invoked. A fully-qualified class name should be used. If the -jar option is specified, the first non-option argume nt is the name of a JAR archive containing class and resource f iles for the application, with the startup class indicated by the Main-Class manifest header.<br />The Java runtime searches for the startup class, and other classes used, in three sets of locations: the bootstrap class path, the installed extensions, and the user class path.<br />Non-option arguments after the class name or JAR file name are passed to the main function.<br />The javaw command is identical to java, except that with javaw there is no associated console window. Use javaw when you don't want a command prompt window to appear. The javaw launcher will, however, display a dialog box with error information if a launch fails for some reason.<br />OPTIONS<br />The launcher has a set of <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">standard options</a> that are supported on the current runtime environment and will be supported in future releases. In addition, the default Java HotSpot VMs provide a set of <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindows%2522%2520l%2520">non-standard options</a> that are subject to change in future releases.<br />Standard Options<br />-client<br />Select the Java HotSpot Client VM.<br />For more information, see <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsguidevmserver-class.html">Server-Class Machine Detection</a><br />-server<br />Select the Java HotSpot Server VM.<br />For more information, see <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsguidevmserver-class.html">Server-Class Machine Detection</a><br />-agentlib:libname[=options]<br />Load native agent library libname, e.g.<br />-agentlib:hprof<br />-agentlib:jdwp=help<br />-agentlib:hprof=help<br />For more information, see <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsguidejvmtijvmti.html#starting">JVMTI Agent Command Line Options</a>.<br />-agentpath:pathname[=options]<br />Load a native agent library by full pathname. For more information, see <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsguidejvmtijvmti.html#starting">JVMTI Agent Command Line Options</a>.<br />-classpath classpath<br />-cp classpath<br />Specify a list of directories, JAR archives, and ZIP archives to search for class files. Class path entries are separated by semicolons (;). Specifying -classpath or -cp overrides any setting of the CLASSPATH environment variable.<br />If -classpath and -cp are not used and CLASSPATH is not set, the user class path consists of the current directory (.).<br />For more information on class paths, see <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindowsclasspath.html">Setting the Class Path</a>.<br />-Dproperty=value<br />Set a system property value. If value is a string that contains spaces, you must enclose the string in double quotes: java -Dfoo="some string" SomeClass <br />-enableassertions[:<package>"..." :<class> ]<br />-ea[:<package>"..." :<class> ]<br />Enable assertions. Assertions are disabled by default.<br />With no arguments, enableassertions or -ea enables assertions. With one argument ending in "...", the switch enables assertions in the specified package and any subpackages. If the argument is simply "...", the switch enables assertions in the unnamed package in the current working directory. With one argument not ending in "...", the switch enables assertions in the specified class.<br />If a single command line contains multiple instances of these switches, they are processed in order before loading any classes. So, for example, to run a program with assertions enabled only in package com.wombat.fruitbat (and any subpackages), the following command could be used: java -ea:com.wombat.fruitbat... <main><br />The -enableassertions and -ea switches apply to all s loaders and to system classes (which do not have a class loader). There is one exception to this rule: in their no-argument form, the switches do not apply to system. This makes it easy to turn on asserts in all classes except for system classes. A separate switch is provided to enable asserts in all system classes; see -enablesystemassertions below.<br />-disableassertions[:<package>"..." :<class ; ]<br />-da[:<package>"..." :<class> ]<br />Disable assertions. This is the default.<br />With no arguments, disableassertions or -da disables assertions. With one argument ending in "...", the switch disables assertions in the specified package and any subpackages. If the argument is simply "...", the switch disables assertions in the unnamed package in the rent working directory. With one argument not ending in "...", the switch disables assertions in the specified class.<br />To run a program with assertions enabled in package com.wombat.fruitbat but disabled in class com.wombat.fruitbat.Brickbat, the following command could be used: java -ea:com.wombat.fruitbat... -da:com.wombat.fruitbat.Brickbat lt;Main Class><br />The -disableassertions and -da switches apply to all ss loaders and to system classes (which do not have a class loader). There is one exception to this rule: in their no-argument form, the switches do not apply to system. This makes it easy to turn on asserts in all classes except for system classes. A separate switch is provided to enable asserts in all system classes; see -disablesystemassertions below.<br />-enablesystemassertions<br />-esa<br />Enable asserts in all system classes (sets the default assertion status for system classes to true).<br />-disablesystemassertions<br />-dsa<br />Disables asserts in all system classes.<br />-jar<br />Execute a program encapsulated in a JAR file. The first argument is the name of a JAR file instead of a startup class name. In order for this option to work, the manifest of the JAR file must contain a line of the form Main-Class: classname. Here, classname identifies the class having the public static void main(String[] args) method that serves as your application's starting point. See the <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindowsjar.html">Jar tool reference page</a> and the Jar trail of the <a href="http://java.sun.com/docs/books/tutorial/jar">Java Tutorial</a> for information about working with Jar files and Jar-file manifests.<br />When you use this option, the JAR file is the source of all user classes, and other user class path settings are ignored.<br />-javaagent:jarpath[=options]<br />Load a Java programming language agent, see java.lang.instrument.<br />-verbose<br />-verbose:class<br />Display information about each class loaded.<br />-verbose:gc<br />Report on each garbage collection event.<br />-verbose:jni<br />Report information about use of native methods and other Java Native Interface activity.<br />-version<br />Display version information and exit.<br />-showversion<br />Display version information and continue.<br />-?<br />-help<br />Display usage information and exit.<br />-X<br />Display information about non-standard options and exit.<br />Non-Standard Options<br />-Xint<br />Operate in interpreted-only mode. Compilation to native code is disabled, and all bytecodes are executed by the interpreter. The performance benefits offered by the Java HotSpot Client VM's adaptive compiler will not be present in this mode.<br />-Xbatch<br />Disable background compilation. Normally the VM will compile the method as a background task, running the method in interpreter mode until the background compilation is finished. The -Xbatch flag disables background compilation so that compilation of all methods proceeds as a foreground task until completed.<br />-Xdebug<br />Start with support for <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsguidejpdajvmdi-spec.html">JVMDI</a> enabled. JVMDI has been deprecated and is not used for debugging in J2SE 5.0, so this option isn't needed for debugging in J2SE 5.0.<br />-Xbootclasspath:bootclasspath<br />Specify a semicolon-separated list of directories, JAR archives, and ZIP archives to search for boot class files. These are used in place of the boot class files included in the Java 2 SDK. Note: Applications that use this option for the purpose of overriding a class in rt.jar should not be deployed as doing so would contravene the Java 2 Runtime Environment binary code license.<br />-Xbootclasspath/a:path<br />Specify a semicolon-separated path of directires, JAR archives, and ZIP archives to append to the default bootstrap class path.<br />-Xbootclasspath/p:path<br />Specify a semicolon-separated path of directires, JAR archives, and ZIP archives to prepend in front of the default bootstrap class path. Note: Applications that use this option for the purpose of overriding a class in rt.jar should not be deployed as doing so would contravene the Java 2 Runtime Environment binary code license.<br />-Xcheck:jni<br />Perform additional checks for Java Native Interface (JNI) functions. Specifically, the Java Virtual Machine validates the parameters passed to the JNI function as well as the runtime environment data before processing the JNI request. Any invalid data encountered indicates a problem in the native code, and the Java Virtual Machine will terminate with a fatal error in such cases. Expect a performance degradation when this option is used.<br />-Xfuture<br />Perform strict class-file format checks. For purposes of backwards compatibility, the default format checks performed by the Java 2 SDK's virtual machine are no stricter than the checks performed by 1.1.x versions of the JDK software. The -Xfuture flag turns on stricter class-file format checks that enforce closer conformance to the class-file format specification. Developers are encouraged to use this flag when developing new code because the stricter checks will become the default in future releases of the Java application launcher.<br />-Xnoclassgc<br />Disable class garbage collection.<br />-Xincgc<br />Enable the incremental garbage collector. The incremental garbage collector, which is off by default, will reduce the occasional long garbage-collection pauses during program execution. The incremental garbage collector will at times execute concurrently with the program and during such times will reduce the processor capacity available to the program.<br />-Xloggc:file<br />Report on each garbage collection event, as with -verbose:gc, but log this data to file. In addition to the information -verbose:gc gives, each reported event will be preceeded by the time (in seconds) since the first garbage-collection event.<br />Always use a local file system for storage of this file to avoid stalling the JVM due to network latency. The file may be truncated in the case of a full file system and logging will continue on the truncated file. This option overrides -verbose:gc if both are given on the command line.<br />-Xmsn<br />Specify the initial size, in bytes, of the memory allocation pool. This value must be a multiple of 1024 greater than 1MB. Append the letter k or K to indicate kilobytes, or m or M to indicate megabytes. The default value is 2MB. Examples: -Xms6291456 -Xms6144k -Xms6m <br />-Xmxn<br />Specify the maximum size, in bytes, of the memory allocation pool. This value must a multiple of 1024 greater than 2MB. Append the letter k or K to indicate kilobytes, or m or M to indicate megabytes. The default value is 64MB. Examples: -Xmx83886080 -Xmx81920k -Xmx80m <br />-Xprof<br />Profiles the running program, and sends profiling data to standard output. This option is provided as a utility that is useful in program development and is not intended to be be used in production systems.<br />-Xrunhprof[:help][:<suboption>=<value>,...]<br />Enables cpu, heap, or monitor profiling. This option is typically followed by a list of comma-separated "<suboption>=<value>" pairs . Run the command java -Xrunhprof:help to obtain a list of suboptions and their default values.<br />-Xrs<br />Reduces usage of operating-system signals by the Java virtual machine (JVM). This option is available beginning with J2SE 1.3.1.<br />In J2SE 1.3.0, the Shutdown Hooks facility was added to allow orderly shutdown of a Java application. The intent was to allow user cleanup code (such as closing database connections) to run at shutdown, even if the JVM terminates abruptly.<br />The JVM watches for console control events to implement shutdown hooks for abnormal JVM termination. Specifically, the JVM registers a console control handler which begins shutdown-hook processing and returns TRUE for CTRL_C_EVENT, CTRL_CLOSE_EVENT, CTRL_LOGOFF_EVENT, and CTRL_SHUTDOWN_EVENT.<br />The JVM uses a similar mechanism to implement the pre-1.2 feature of dumping thread stacks for debugging purposes. Sun's JVM uses CTRL_BREAK_EVENT to perform thread dumps.<br />If the JVM is run as a service (for example, the servlet engine for a web server), it can receive CTRL_LOGOFF_EVENT but should not initiate shutdown since the operating system will not actually terminate the process. To avoid possible interference such as this, the -Xrs command-line option has been added beginning with J2SE 1.3.1. When the -Xrs option is used on Sun's JVM, the JVM does not install a console control handler, implying that it does not watch for or process CTRL_C_EVENT, CTRL_CLOSE_EVENT, CTRL_LOGOFF_EVENT, or CTRL_SHUTDOWN_EVENT.<br />There are two consequences of specifying -Xrs:<br />· Ctrl-Break thread dumps are not available.<br />· User code is responsible for causing shutdown hooks to run, for example by calling System.exit() when the JVM is to be terminated.<br />-Xssn<br />Set thread stack size.<br />SEE ALSO<br />· <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindowsjavac.html">javac - the Java programming language compiler</a><br />· <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindowsjdb.html">jdb - Java Application Debugger</a><br />· <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindowsjavah.html">javah - C Header and Stub File Generator</a><br />· <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docstooldocswindowsjar.html">jar - JAR Archive Tool</a><br />· <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsguideextensionsindex.html">The Java Extensions Framework</a><br />· <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsguidesecurityindex.html">Security Features</a>.<br />com.sun.jdi Interface PrimitiveType<br />All Superinterfaces:<br /><a title="interface in com.sun.jdi" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsguidejpdajdicomsunjdiMirror.html">Mirror</a>, <a title="interface in com.sun.jdi" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsguidejpdajdicomsunjdiType.html">Type</a><br />All Known Subinterfaces:<br /><a title="interface in com.sun.jdi" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsguidejpdajdicomsunjdiBooleanType.html">BooleanType</a>, <a title="interface in com.sun.jdi" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsguidejpdajdicomsunjdiByteType.html">ByteType</a>, <a title="interface in com.sun.jdi" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsguidejpdajdicomsunjdiCharType.html">CharType</a>, <a title="interface in com.sun.jdi" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsguidejpdajdicomsunjdiDoubleType.html">DoubleType</a>, <a title="interface in com.sun.jdi" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsguidejpdajdicomsunjdiFloatType.html">FloatType</a>, <a title="interface in com.sun.jdi" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsguidejpdajdicomsunjdiIntegerType.html">IntegerType</a>, <a title="interface in com.sun.jdi" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsguidejpdajdicomsunjdiLongType.html">LongType</a>, <a title="interface in com.sun.jdi" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsguidejpdajdicomsunjdiShortType.html">ShortType</a><br />public interface PrimitiveTypeextends <a title="interface in com.sun.jdi" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsguidejpdajdicomsunjdiType.html">Type</a><br />The type associated with non-object values in a target VM. Instances of one of the sub-interfaces of this interface will be returned from <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsguidejpdajdicomsunjdiValue.html#type()">Value.type()</a> for all <a title="interface in com.sun.jdi" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsguidejpdajdicomsunjdiPrimitiveValue.html">PrimitiveValue</a> objects.<br />Since:<br />1.3<br />See Also:<br /><a title="interface in com.sun.jdi" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsguidejpdajdicomsunjdiPrimitiveValue.html">PrimitiveValue</a><br />Method Summary<br /> <br />Methods inherited from interface com.sun.jdi.<a title="interface in com.sun.jdi" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsguidejpdajdicomsunjdiType.html">Type</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsguidejpdajdicomsunjdiType.html#name()">name</a>, <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsguidejpdajdicomsunjdiType.html#signature()">signature</a><br /> <br />Methods inherited from interface com.sun.jdi.<a title="interface in com.sun.jdi" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsguidejpdajdicomsunjdiMirror.html">Mirror</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsguidejpdajdicomsunjdiMirror.html#toString()">toString</a>, <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsguidejpdajdicomsunjdiMirror.html#virtualMachine()">virtualMachine</a><br /> javax.naming Class Reference<a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html">java.lang.Object</a> <br /><br />javax.naming.Reference<br />All Implemented Interfaces:<br /><a title="interface in java.io" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioSerializable.html">Serializable</a>, <a title="interface in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangCloneable.html">Cloneable</a><br />Direct Known Subclasses:<br /><a title="class in javax.naming" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxnamingLinkRef.html">LinkRef</a><br />public class Referenceextends <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html">Object</a>implements <a title="interface in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangCloneable.html">Cloneable</a>, <a title="interface in java.io" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaioSerializable.html">Serializable</a><br />This class represents a reference to an object that is found outside of the naming/directory system.<br />Reference provides a way of recording address information about objects which themselves are not directly bound to the naming/directory system.<br />A Reference consists of an ordered list of addresses and class information about the object being referenced. Each address in the list identifies a communications endpoint for the same conceptual object. The "communications endpoint" is information that indicates how to contact the object. It could be, for example, a network address, a location in memory on the local machine, another process on the same machine, etc. The order of the addresses in the list may be of significance to object factories that interpret the reference.<br />Multiple addresses may arise for various reasons, such as replication or the object offering interfaces over more than one communication mechanism. The addresses are indexed starting with zero.<br />A Reference also contains information to assist in creating an instance of the object to which this Reference refers. It contains the class name of that object, and the class name and location of the factory to be used to create the object. The class factory location is a space-separated list of URLs representing the class path used to load the factory. When the factory class (or any class or resource upon which it depends) needs to be loaded, each URL is used (in order) to attempt to load the class.<br />A Reference instance is not synchronized against concurrent access by multiple threads. Threads that need to access a single Reference concurrently should synchronize amongst themselves and provide the necessary locking.<br />Since:<br />1.3<br />See Also:<br /><a title="class in javax.naming" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxnamingRefAddr.html">RefAddr</a>, <a title="class in javax.naming" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxnamingStringRefAddr.html">StringRefAddr</a>, <a title="class in javax.naming" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxnamingBinaryRefAddr.html">BinaryRefAddr</a>, <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapiserialized-form.html#javax.naming.Reference">Serialized Form</a><br />Field Summary<br />protected <a title="class in java.util" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilVector.html">Vector</a><<a title="class in javax.naming" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxnamingRefAddr.html">RefAddr</a>><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxnamingReference.html#addrs">addrs</a> Contains the addresses contained in this Reference.<br />protected <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxnamingReference.html#classFactory">classFactory</a> Contains the name of the factory class for creating an instance of the object to which this Reference refers.<br />protected <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxnamingReference.html#classFactoryLocation">classFactoryLocation</a> Contains the location of the factory class.<br />protected <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxnamingReference.html#className">className</a> Contains the fully-qualified name of the class of the object to which this Reference refers.<br /> <br />Constructor Summary<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxnamingReference.html#Reference(java.lang.String)">Reference</a>(<a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> className) Constructs a new reference for an object with class name 'className'.<br /><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxnamingReference.html#Reference(java.lang.String,">Reference</a>(<a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> className, <a title="class in javax.naming" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxnamingRefAddr.html">RefAddr</a> addr) Constructs a new reference for an object with class name 'className' and an address.<br /><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxnamingReference.html#Reference(java.lang.String,">Reference</a>(<a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> className, <a title="class in javax.naming" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxnamingRefAddr.html">RefAddr</a> addr, <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> factory, <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> factoryLocation) Constructs a new reference for an object with class name 'className', the class name and location of the object's factory, and the address for the object.<br /><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxnamingReference.html#Reference(java.lang.String,">Reference</a>(<a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> className, <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> factory, <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> factoryLocation) Constructs a new reference for an object with class name 'className', and the class name and location of the object's factory.<br /><br /> <br />Method Summary<br /> void<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxnamingReference.html#add(int,">add</a>(int posn, <a title="class in javax.naming" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxnamingRefAddr.html">RefAddr</a> addr) Adds an address to the list of addresses at index posn.<br /> void<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxnamingReference.html#add(javax.naming.RefAddr)">add</a>(<a title="class in javax.naming" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxnamingRefAddr.html">RefAddr</a> addr) Adds an address to the end of the list of addresses.<br /> void<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxnamingReference.html#clear()">clear</a>() Deletes all addresses from this reference.<br /> <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html">Object</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxnamingReference.html#clone()">clone</a>() Makes a copy of this reference using its class name list of addresses, class factory name and class factory location.<br /> boolean<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxnamingReference.html#equals(java.lang.Object)">equals</a>(<a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html">Object</a> obj) Determines whether obj is a reference with the same addresses (in same order) as this reference.<br /> <a title="class in javax.naming" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxnamingRefAddr.html">RefAddr</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxnamingReference.html#get(int)">get</a>(int posn) Retrieves the address at index posn.<br /> <a title="class in javax.naming" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxnamingRefAddr.html">RefAddr</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxnamingReference.html#get(java.lang.String)">get</a>(<a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> addrType) Retrieves the first address that has the address type 'addrType'.<br /> <a title="interface in java.util" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilEnumeration.html">Enumeration</a><<a title="class in javax.naming" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxnamingRefAddr.html">RefAddr</a>><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxnamingReference.html#getAll()">getAll</a>() Retrieves an enumeration of the addresses in this reference.<br /> <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxnamingReference.html#getClassName()">getClassName</a>() Retrieves the class name of the object to which this reference refers.<br /> <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxnamingReference.html#getFactoryClassLocation()">getFactoryClassLocation</a>() Retrieves the location of the factory of the object to which this reference refers.<br /> <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxnamingReference.html#getFactoryClassName()">getFactoryClassName</a>() Retrieves the class name of the factory of the object to which this reference refers.<br /> int<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxnamingReference.html#hashCode()">hashCode</a>() Computes the hash code of this reference.<br /> <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html">Object</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxnamingReference.html#remove(int)">remove</a>(int posn) Deletes the address at index posn from the list of addresses.<br /> int<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxnamingReference.html#size()">size</a>() Retrieves the number of addresses in this reference.<br /> <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxnamingReference.html#toString()">toString</a>() Generates the string representation of this reference.<br /> <br />Methods inherited from class java.lang.<a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html">Object</a><br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html#finalize()">finalize</a>, <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html#getClass()">getClass</a>, <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html#notify()">notify</a>, <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html#notifyAll()">notifyAll</a>, <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html#wait()">wait</a>, <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html#wait(long)">wait</a>, <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html#wait(long,">wait</a><br /> <br />Field Detail<br />classNameprotected <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> className<br />Contains the fully-qualified name of the class of the object to which this Reference refers.<br />See Also:<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangClass.html#getName()">Class.getName()</a><br />addrsprotected <a title="class in java.util" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilVector.html">Vector</a><<a title="class in javax.naming" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxnamingRefAddr.html">RefAddr</a>> addrs<br />Contains the addresses contained in this Reference. Initialized by constructor.<br />classFactoryprotected <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> classFactory<br />Contains the name of the factory class for creating an instance of the object to which this Reference refers. Initialized to null.<br />classFactoryLocationprotected <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> classFactoryLocation<br />Contains the location of the factory class. Initialized to null.<br />Constructor Detail<br />Referencepublic Reference(<a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> className)<br />Constructs a new reference for an object with class name 'className'. Class factory and class factory location are set to null. The newly created reference contains zero addresses.<br />Parameters:<br />className - The non-null class name of the object to which this reference refers.<br />Referencepublic Reference(<a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> className, <a title="class in javax.naming" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxnamingRefAddr.html">RefAddr</a> addr)<br />Constructs a new reference for an object with class name 'className' and an address. Class factory and class factory location are set to null.<br />Parameters:<br />className - The non-null class name of the object to which this reference refers.<br />addr - The non-null address of the object.<br />Referencepublic Reference(<a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> className, <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> factory, <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> factoryLocation)<br />Constructs a new reference for an object with class name 'className', and the class name and location of the object's factory.<br />Parameters:<br />className - The non-null class name of the object to which this reference refers.<br />factory - The possibly null class name of the object's factory.<br />factoryLocation - The possibly null location from which to load the factory (e.g. URL)<br />See Also:<br /><a title="interface in javax.naming.spi" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxnamingspiObjectFactory.html">ObjectFactory</a>, <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxnamingspiNamingManager.html#getObjectInstance(java.lang.Object,">NamingManager.getObjectInstance(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable)</a><br />Referencepublic Reference(<a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> className, <a title="class in javax.naming" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxnamingRefAddr.html">RefAddr</a> addr, <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> factory, <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> factoryLocation)<br />Constructs a new reference for an object with class name 'className', the class name and location of the object's factory, and the address for the object.<br />Parameters:<br />className - The non-null class name of the object to which this reference refers.<br />factory - The possibly null class name of the object's factory.<br />factoryLocation - The possibly null location from which to load the factory (e.g. URL)<br />addr - The non-null address of the object.<br />See Also:<br /><a title="interface in javax.naming.spi" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxnamingspiObjectFactory.html">ObjectFactory</a>, <a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxnamingspiNamingManager.html#getObjectInstance(java.lang.Object,">NamingManager.getObjectInstance(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable)</a><br />Method Detail<br />getClassNamepublic <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> getClassName()<br />Retrieves the class name of the object to which this reference refers.<br />Returns:<br />The non-null fully-qualified class name of the object. (e.g. "java.lang.String")<br />getFactoryClassNamepublic <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> getFactoryClassName()<br />Retrieves the class name of the factory of the object to which this reference refers.<br />Returns:<br />The possibly null fully-qualified class name of the factory. (e.g. "java.lang.String")<br />getFactoryClassLocationpublic <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> getFactoryClassLocation()<br />Retrieves the location of the factory of the object to which this reference refers. If it is a codebase, then it is an ordered list of URLs, separated by spaces, listing locations from where the factory class definition should be loaded.<br />Returns:<br />The possibly null string containing the location for loading in the factory's class.<br />getpublic <a title="class in javax.naming" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxnamingRefAddr.html">RefAddr</a> get(<a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> addrType)<br />Retrieves the first address that has the address type 'addrType'. String.compareTo() is used to test the equality of the address types.<br />Parameters:<br />addrType - The non-null address type for which to find the address.<br />Returns:<br />The address in this reference with address type 'addrType; null if no such address exist.<br />getpublic <a title="class in javax.naming" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxnamingRefAddr.html">RefAddr</a> get(int posn)<br />Retrieves the address at index posn.<br />Parameters:<br />posn - The index of the address to retrieve.<br />Returns:<br />The address at the 0-based index posn. It must be in the range [0,getAddressCount()).<br />Throws:<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangArrayIndexOutOfBoundsException.html">ArrayIndexOutOfBoundsException</a> - If posn not in the specified range.<br />getAllpublic <a title="interface in java.util" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilEnumeration.html">Enumeration</a><<a title="class in javax.naming" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxnamingRefAddr.html">RefAddr</a>> getAll()<br />Retrieves an enumeration of the addresses in this reference. When addresses are added, changed or removed from this reference, its effects on this enumeration are undefined.<br />Returns:<br />An non-null enumeration of the addresses (RefAddr) in this reference. If this reference has zero addresses, an enumeration with zero elements is returned.<br />sizepublic int size()<br />Retrieves the number of addresses in this reference.<br />Returns:<br />The nonnegative number of addresses in this reference.<br />addpublic void add(<a title="class in javax.naming" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxnamingRefAddr.html">RefAddr</a> addr)<br />Adds an address to the end of the list of addresses.<br />Parameters:<br />addr - The non-null address to add.<br />addpublic void add(int posn, <a title="class in javax.naming" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavaxnamingRefAddr.html">RefAddr</a> addr)<br />Adds an address to the list of addresses at index posn. All addresses at index posn or greater are shifted up the list by one (away from index 0).<br />Parameters:<br />posn - The 0-based index of the list to insert addr.<br />addr - The non-null address to add.<br />Throws:<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangArrayIndexOutOfBoundsException.html">ArrayIndexOutOfBoundsException</a> - If posn not in the specified range.<br />removepublic <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html">Object</a> remove(int posn)<br />Deletes the address at index posn from the list of addresses. All addresses at index greater than posn are shifted down the list by one (towards index 0).<br />Parameters:<br />posn - The 0-based index of in address to delete.<br />Returns:<br />The address removed.<br />Throws:<br /><a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangArrayIndexOutOfBoundsException.html">ArrayIndexOutOfBoundsException</a> - If posn not in the specified range.<br />clearpublic void clear()<br />Deletes all addresses from this reference.<br />equalspublic boolean equals(<a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html">Object</a> obj)<br />Determines whether obj is a reference with the same addresses (in same order) as this reference. The addresses are checked using RefAddr.equals(). In addition to having the same addresses, the Reference also needs to have the same class name as this reference. The class factory and class factory location are not checked. If obj is null or not an instance of Reference, null is returned.<br />Overrides:<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html#equals(java.lang.Object)">equals</a> in class <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html">Object</a><br />Parameters:<br />obj - The possibly null object to check.<br />Returns:<br />true if obj is equal to this reference; false otherwise.<br />See Also:<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html#hashCode()">Object.hashCode()</a>, <a title="class in java.util" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilHashtable.html">Hashtable</a><br />hashCodepublic int hashCode()<br />Computes the hash code of this reference. The hash code is the sum of the hash code of its addresses.<br />Overrides:<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html#hashCode()">hashCode</a> in class <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html">Object</a><br />Returns:<br />A hash code of this reference as an int.<br />See Also:<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html#equals(java.lang.Object)">Object.equals(java.lang.Object)</a>, <a title="class in java.util" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavautilHashtable.html">Hashtable</a><br />toStringpublic <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangString.html">String</a> toString()<br />Generates the string representation of this reference. The string consists of the class name to which this reference refers, and the string representation of each of its addresses. This representation is intended for display only and not to be parsed.<br />Overrides:<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html#toString()">toString</a> in class <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html">Object</a><br />Returns:<br />The non-null string representation of this reference.<br />clonepublic <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html">Object</a> clone()<br />Makes a copy of this reference using its class name list of addresses, class factory name and class factory location. Changes to the newly created copy does not affect this Reference and vice versa.<br />Overrides:<br /><a href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html#clone()">clone</a> in class <a title="class in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangObject.html">Object</a><br />Returns:<br />a clone of this instance.<br />See Also:<br /><a title="interface in java.lang" href="file:///C:Program%2520FilesJavajdk1.5.0_06docsapijavalangCloneable.html">Cloneable</a> <div style='clear: both;'></div> </div> <div class='post-footer'> <div class='post-footer-line post-footer-line-1'> <span class='post-author vcard'> Posted by <span class='fn' itemprop='author' itemscope='itemscope' itemtype='http://schema.org/Person'> <meta content='https://www.blogger.com/profile/01283796421780209428' itemprop='url'/> <a class='g-profile' href='https://www.blogger.com/profile/01283796421780209428' rel='author' title='author profile'> <span itemprop='name'>jaicoCoE16</span> </a> </span> </span> <span class='post-timestamp'> at <meta content='http://jaicodictaan.blogspot.com/2007/10/array-in-java.html' itemprop='url'/> <a class='timestamp-link' href='http://jaicodictaan.blogspot.com/2007/10/array-in-java.html' rel='bookmark' title='permanent link'><abbr class='published' itemprop='datePublished' title='2007-10-29T04:06:00-07:00'>4:06 AM</abbr></a> </span> <span class='post-comment-link'> </span> <span class='post-icons'> <span class='item-control blog-admin pid-1325764851'> <a href='https://www.blogger.com/post-edit.g?blogID=4623749140724233097&postID=7417205825741674434&from=pencil' title='Edit Post'> <img alt='' class='icon-action' height='18' src='https://resources.blogblog.com/img/icon18_edit_allbkg.gif' width='18'/> </a> </span> </span> <div class='post-share-buttons goog-inline-block'> </div> </div> <div class='post-footer-line post-footer-line-2'> <span class='post-labels'> Labels: <a href='http://jaicodictaan.blogspot.com/search/label/java%20programming%20array' rel='tag'>java programming array</a> </span> </div> <div class='post-footer-line post-footer-line-3'> <span class='post-location'> </span> </div> </div> </div> <div class='comments' id='comments'> <a name='comments'></a> <h4>No comments:</h4> <div id='Blog1_comments-block-wrapper'> <dl class='avatar-comment-indent' id='comments-block'> </dl> </div> <p class='comment-footer'> <a href='https://www.blogger.com/comment/fullpage/post/4623749140724233097/7417205825741674434' onclick=''>Post a Comment</a> </p> </div> </div> </div></div> </div> <div class='blog-pager' id='blog-pager'> <span id='blog-pager-newer-link'> <a class='blog-pager-newer-link' href='http://jaicodictaan.blogspot.com/2007/10/salot-quickly-now-which-of-following.html' id='Blog1_blog-pager-newer-link' title='Newer Post'>Newer Post</a> </span> <span id='blog-pager-older-link'> <a class='blog-pager-older-link' href='http://jaicodictaan.blogspot.com/2007/10/basketball-warm-up.html' id='Blog1_blog-pager-older-link' title='Older Post'>Older Post</a> </span> <a class='home-link' href='http://jaicodictaan.blogspot.com/'>Home</a> </div> <div class='clear'></div> <div class='post-feeds'> <div class='feed-links'> Subscribe to: <a class='feed-link' href='http://jaicodictaan.blogspot.com/feeds/7417205825741674434/comments/default' target='_blank' type='application/atom+xml'>Post Comments (Atom)</a> </div> </div> </div></div> </div> <div id='sidebar-wrapper'> <div class='sidebar section' id='sidebar'><div class='widget Profile' data-version='1' id='Profile1'> <h2>About Me</h2> <div class='widget-content'> <dl class='profile-datablock'> <dt class='profile-data'> <a class='profile-name-link g-profile' href='https://www.blogger.com/profile/01283796421780209428' rel='author' style='background-image: url(//www.blogger.com/img/logo-16.png);'> jaicoCoE16 </a> </dt> </dl> <a class='profile-link' href='https://www.blogger.com/profile/01283796421780209428' rel='author'>View my complete profile</a> <div class='clear'></div> </div> </div></div> </div> <!-- spacer for skins that want sidebar and main to be the same height--> <div class='clear'> </div> </div> <!-- end content-wrapper --> <div id='footer-wrapper'> <div class='footer no-items section' id='footer'></div> </div> </div></div> <!-- end outer-wrapper --> <script type="text/javascript" src="https://www.blogger.com/static/v1/widgets/387437488-widgets.js"></script> <script type='text/javascript'> window['__wavt'] = 'AEUoTZr1Hw2pvuuYmHSGMMS1V0u2:1781032536363';_WidgetManager._Init('//www.blogger.com/rearrange?blogID\x3d4623749140724233097','//jaicodictaan.blogspot.com/2007/10/array-in-java.html','4623749140724233097'); _WidgetManager._SetDataContext([{'name': 'blog', 'data': {'blogId': '4623749140724233097', 'title': 'nicholas wolfwood A.K.A mariachi', 'url': 'http://jaicodictaan.blogspot.com/2007/10/array-in-java.html', 'canonicalUrl': 'http://jaicodictaan.blogspot.com/2007/10/array-in-java.html', 'homepageUrl': 'http://jaicodictaan.blogspot.com/', 'searchUrl': 'http://jaicodictaan.blogspot.com/search', 'canonicalHomepageUrl': 'http://jaicodictaan.blogspot.com/', 'blogspotFaviconUrl': 'http://jaicodictaan.blogspot.com/favicon.ico', 'bloggerUrl': 'https://www.blogger.com', 'hasCustomDomain': false, 'httpsEnabled': true, 'enabledCommentProfileImages': true, 'gPlusViewType': 'FILTERED_POSTMOD', 'adultContent': false, 'analyticsAccountNumber': '', 'encoding': 'UTF-8', 'locale': 'en-US', 'localeUnderscoreDelimited': 'en', 'languageDirection': 'ltr', 'isPrivate': false, 'isMobile': false, 'isMobileRequest': false, 'mobileClass': '', 'isPrivateBlog': false, 'isDynamicViewsAvailable': true, 'feedLinks': '\x3clink rel\x3d\x22alternate\x22 type\x3d\x22application/atom+xml\x22 title\x3d\x22nicholas wolfwood A.K.A mariachi - Atom\x22 href\x3d\x22http://jaicodictaan.blogspot.com/feeds/posts/default\x22 /\x3e\n\x3clink rel\x3d\x22alternate\x22 type\x3d\x22application/rss+xml\x22 title\x3d\x22nicholas wolfwood A.K.A mariachi - RSS\x22 href\x3d\x22http://jaicodictaan.blogspot.com/feeds/posts/default?alt\x3drss\x22 /\x3e\n\x3clink rel\x3d\x22service.post\x22 type\x3d\x22application/atom+xml\x22 title\x3d\x22nicholas wolfwood A.K.A mariachi - Atom\x22 href\x3d\x22https://www.blogger.com/feeds/4623749140724233097/posts/default\x22 /\x3e\n\n\x3clink rel\x3d\x22alternate\x22 type\x3d\x22application/atom+xml\x22 title\x3d\x22nicholas wolfwood A.K.A mariachi - Atom\x22 href\x3d\x22http://jaicodictaan.blogspot.com/feeds/7417205825741674434/comments/default\x22 /\x3e\n', 'meTag': '', 'adsenseHostId': 'ca-host-pub-1556223355139109', 'adsenseHasAds': false, 'adsenseAutoAds': false, 'boqCommentIframeForm': true, 'loginRedirectParam': '', 'view': '', 'dynamicViewsCommentsSrc': '//www.blogblog.com/dynamicviews/4224c15c4e7c9321/js/comments.js', 'dynamicViewsScriptSrc': '//www.blogblog.com/dynamicviews/ff2fc60a7f0d8424', 'plusOneApiSrc': 'https://apis.google.com/js/platform.js', 'disableGComments': true, 'interstitialAccepted': false, 'sharing': {'platforms': [{'name': 'Get link', 'key': 'link', 'shareMessage': 'Get link', 'target': ''}, {'name': 'Facebook', 'key': 'facebook', 'shareMessage': 'Share to Facebook', 'target': 'facebook'}, {'name': 'BlogThis!', 'key': 'blogThis', 'shareMessage': 'BlogThis!', 'target': 'blog'}, {'name': 'X', 'key': 'twitter', 'shareMessage': 'Share to X', 'target': 'twitter'}, {'name': 'Pinterest', 'key': 'pinterest', 'shareMessage': 'Share to Pinterest', 'target': 'pinterest'}, {'name': 'Email', 'key': 'email', 'shareMessage': 'Email', 'target': 'email'}], 'disableGooglePlus': true, 'googlePlusShareButtonWidth': 0, 'googlePlusBootstrap': '\x3cscript type\x3d\x22text/javascript\x22\x3ewindow.___gcfg \x3d {\x27lang\x27: \x27en\x27};\x3c/script\x3e'}, 'hasCustomJumpLinkMessage': false, 'jumpLinkMessage': 'Read more', 'pageType': 'item', 'postId': '7417205825741674434', 'postImageUrl': 'doc-files/Button.gif', 'pageName': 'array in java', 'pageTitle': 'nicholas wolfwood A.K.A mariachi: array in java'}}, {'name': 'features', 'data': {}}, {'name': 'messages', 'data': {'edit': 'Edit', 'linkCopiedToClipboard': 'Link copied to clipboard!', 'ok': 'Ok', 'postLink': 'Post Link'}}, {'name': 'template', 'data': {'isResponsive': false, 'isAlternateRendering': false, 'isCustom': false}}, {'name': 'view', 'data': {'classic': {'name': 'classic', 'url': '?view\x3dclassic'}, 'flipcard': {'name': 'flipcard', 'url': '?view\x3dflipcard'}, 'magazine': {'name': 'magazine', 'url': '?view\x3dmagazine'}, 'mosaic': {'name': 'mosaic', 'url': '?view\x3dmosaic'}, 'sidebar': {'name': 'sidebar', 'url': '?view\x3dsidebar'}, 'snapshot': {'name': 'snapshot', 'url': '?view\x3dsnapshot'}, 'timeslide': {'name': 'timeslide', 'url': '?view\x3dtimeslide'}, 'isMobile': false, 'title': 'array in java', 'description': 'java.util Class ArrayList java.lang.Object java.util.AbstractCollection java.util.AbstractList java.util.ArrayList All Implem...', 'featuredImage': 'https://lh3.googleusercontent.com/blogger_img_proxy/AEn0k_tHVWdzg-Lsn_TpzzgWvdPjxor01XDS77RZvs7ziRYlzD_ein5I3Am00gxYEV9Ie2fs90byL_UZJ7rT1gM', 'url': 'http://jaicodictaan.blogspot.com/2007/10/array-in-java.html', 'type': 'item', 'isSingleItem': true, 'isMultipleItems': false, 'isError': false, 'isPage': false, 'isPost': true, 'isHomepage': false, 'isArchive': false, 'isLabelSearch': false, 'postId': 7417205825741674434}}]); _WidgetManager._RegisterWidget('_NavbarView', new _WidgetInfo('Navbar1', 'navbar', document.getElementById('Navbar1'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_HeaderView', new _WidgetInfo('Header1', 'header', document.getElementById('Header1'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_BlogArchiveView', new _WidgetInfo('BlogArchive1', 'main', document.getElementById('BlogArchive1'), {'languageDirection': 'ltr', 'loadingMessage': 'Loading\x26hellip;'}, 'displayModeFull')); _WidgetManager._RegisterWidget('_BlogView', new _WidgetInfo('Blog1', 'main', document.getElementById('Blog1'), {'cmtInteractionsEnabled': false, 'lightboxEnabled': true, 'lightboxModuleUrl': 'https://www.blogger.com/static/v1/jsbin/1053750561-lbx.js', 'lightboxCssUrl': 'https://www.blogger.com/static/v1/v-css/828616780-lightbox_bundle.css'}, 'displayModeFull')); _WidgetManager._RegisterWidget('_ProfileView', new _WidgetInfo('Profile1', 'sidebar', document.getElementById('Profile1'), {}, 'displayModeFull')); </script> </body> </html>