|
ION Java User's Guide: ION Java Class and Method Reference |
|
The elements of the ION Java class library are documented alphabetically in this chapter. The page or pages describing each class include a description of the class declaration, which provides pointers to the Java class (or other ION class) that the class inherits from, if any. Note that this chapter does not provide documentation for the Java classes themselves; see your Java API reference materials for descriptions of the Java classes. Class methods are documented alphabetically (with the exception of the constructor method for the class, which is documented first) following the description of the class itself.
A description of each method follows its name. Beneath the general description of the method are a number of sections that describe the syntax for calling the method and its arguments (if any). These sections are described below.
The "Syntax" section shows the proper syntax for calling the method.
Java is a strongly-typed language, which means that input and output data variables must be created as or cast to the proper type before use. The "Syntax" description includes the data type of each variable specified. For example, the following is a syntax description for the ION method that sets the value of an IDL variable:
setIDLVariable(String sName, IONVariable oVar)
In this case, there are two arguments to the setIDLVariable method: sName and oVar. The word "String" defines sName as a variable of type string. Similarly, the word "IONVariable" defines oVar as a variable of type IONVariable.
Many ION Java methods can be called in more than one way. In these cases, all of the available syntax definitions are listed together. For example, the following are all valid ways to call the setXValue method of the IONContour class:
setXValue(int X[])
setXValue(float X[])
setXValue(double X[])
setXValue(String sName)
This means that the argument to the setXValue method can be either an integer, single-precision floating-point, or double-precision floating-point array, or a string value.
Arguments that are not required are included in the syntax definition enclosed in square brackets ( [ ] ). Italicized square brackets indicate an array, while non-italicized square brackets indicate that the enclosed arguments are optional. For example, the square brackets in this syntax definition indicate that the variable X is an array variable:
setXValue(int X[])
The square brackets in the following syntax definition indicate that the portNumber argument is optional:
connect(String hostname [, int portNumber])
ION object class and method names are displayed in mixed-case type. Unlike IDL, the Java language is case-sensitive: that is, names of ION Java methods and classes must be entered with the same capitalization as shown in this reference section.
Arguments to ION procedures and functions — data or variables you must provide — are displayed in italic type.
Class declarations, syntax, and examples are shown in courier.
IDL functions, procedures, and keywords are displayed in UPPER CASE type. For example, the calling sequence for an IDL procedure looks like this:
CONTOUR, Z [, X, Y]
The "Arguments" section describes each valid argument to the method. Note that these arguments are positional parameters that must be supplied in the order indicated by the method's syntax.
The "Exceptions" section lists the ION exception values that are thrown when your error-handling code detects an error. For more information on exception handling, consult your Java manual. Refer to the following descriptions for each exception:
A network communication error was detected. Server is disconnected.
The specified IDL command was illegal.
The variable contains an array value.
An ION license could not be obtained.
The IONVariable is not an array.
The specified IDL command is not allowed under the current ION security rules.
The variable is a string that cannot be converted.
The given hostname is unknown.
Where appropriate, the "Example" section includes a short example that demonstrates the use of the method.
IDL Online Help (March 06, 2007)