Previous ION Java User's Guide: ION Java Class and Method Reference Next

getShort()

The getShort() method returns the short value of the variable. If the value is not of type short (IDL type int), the scalar value is converted to a short.

Syntax

public final short getShort()

Return Value

The method returns the short value of the variable.

Arguments

None.

Exceptions

IONIsAnArrayException, NumberFormatException

Example

try {  
short s = myVariable.getShort();  
}catch(IONIsAnArrayException e){  
   System.err.println("Variable is an array");  
}catch(NumberFormatException e){  
   System.err.println("String Cannot be converted");  
}  

  IDL Online Help (March 06, 2007)