com.ibm.jtopenlite.command
Class Parameter

java.lang.Object
  extended by com.ibm.jtopenlite.command.Parameter
Direct Known Subclasses:
InputOutputParameter, InputParameter, NullParameter, OutputParameter

public abstract class Parameter
extends Object

Abstract parent class for all program parameters.


Field Summary
static int TYPE_INPUT
          Constant representing an input parameter.
static int TYPE_INPUT_OUTPUT
          Constant representing an input/output parameter.
static int TYPE_NULL
          Constant representing a null parameter.
static int TYPE_OUTPUT
          Constant representing an output parameter.
 
Constructor Summary
protected Parameter(int type)
           
 
Method Summary
 byte[] getInputData()
          Returns the input data for this parameter.
 int getInputLength()
          Returns the input length of this parameter.
 int getMaxLength()
          Returns the maximum length of this parameter.
 byte[] getOutputData()
          Returns the output data for this parameter.
 int getOutputLength()
          Returns the output length of this parameter.
 int getType()
          Returns the type of this parameter.
 boolean isInput()
          Returns true if the type of this parameter is input or input/output.
 boolean isOutput()
          Returns true if the type of this parameter is output or input/output.
 int parseInt(int offset)
          Convenience method to retrieve the 4-byte integer value in the output data at the specified offset.
 String parseString(int offset, int length)
          Convenience method to retrieve the CCSID 37 String in the output data at the specified offset and length.
protected  void setOutputData(byte[] data)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_NULL

public static final int TYPE_NULL
Constant representing a null parameter.

See Also:
Constant Field Values

TYPE_INPUT

public static final int TYPE_INPUT
Constant representing an input parameter.

See Also:
Constant Field Values

TYPE_OUTPUT

public static final int TYPE_OUTPUT
Constant representing an output parameter.

See Also:
Constant Field Values

TYPE_INPUT_OUTPUT

public static final int TYPE_INPUT_OUTPUT
Constant representing an input/output parameter.

See Also:
Constant Field Values
Constructor Detail

Parameter

protected Parameter(int type)
Method Detail

getInputData

public byte[] getInputData()
Returns the input data for this parameter. The default is null.


getInputLength

public int getInputLength()
Returns the input length of this parameter. The default is 0.


getOutputLength

public int getOutputLength()
Returns the output length of this parameter. The default is 0.


getMaxLength

public int getMaxLength()
Returns the maximum length of this parameter. The default is 0.


setOutputData

protected void setOutputData(byte[] data)

getOutputData

public byte[] getOutputData()
Returns the output data for this parameter. The default is null.


isInput

public boolean isInput()
Returns true if the type of this parameter is input or input/output.


isOutput

public boolean isOutput()
Returns true if the type of this parameter is output or input/output.


getType

public int getType()
Returns the type of this parameter.


parseInt

public int parseInt(int offset)
Convenience method to retrieve the 4-byte integer value in the output data at the specified offset.


parseString

public String parseString(int offset,
                          int length)
                   throws IOException
Convenience method to retrieve the CCSID 37 String in the output data at the specified offset and length.

Throws:
IOException