PIRL

PIRL.Image_Tools
Class JPEG2000_Info

java.lang.Object
  extended by javax.swing.tree.DefaultMutableTreeNode
      extended by PIRL.PVL.Parameter
          extended by PIRL.Image_Tools.JPEG2000_Info
All Implemented Interfaces:
Serializable, Cloneable, MutableTreeNode, TreeNode
Direct Known Subclasses:
JP2_Info, JPEG2000_Codestream_Info

public class JPEG2000_Info
extends Parameter

JPEG2000_Info is a Parameter Aggregate describing a file of JPEG2000 information.

This class is intended to be the base class for JP2_Info and JPEG2000_Codestream_Info Parameter sets. The JPEG2000_Info methods know how to manage the assigned ImageInputStream to obtain data values and keep track of the stream position, but it expects its subclasses to know how to use the data values to generate the appropriate Parameters.

Version:
1.25
Author:
Bradford Castalia UA/PIRL
See Also:
JP2_Info, JPEG2000_Codestream_Info, Serialized Form

Field Summary
static int BITS_VARIABLE
          Value of a bit precision Parameter value when the number of bits is variable.
static String DATA_LENGTH_PARAMETER
          Parameter name for specifying the length (bytes) of a data block.
static String DATA_OFFSET_PARAMETER
          Parameter name for specifying a data block offset in an enclosing object.
static String DATA_POSITION_PARAMETER
          Parameter name for specifying the position of data in the Source file (byte offset from the beginning of the file).
static String ID
          Class identification name with source code version and date.
protected  ImageInputStream Image_Input_Stream
          The ImageInputStream Source from which the JPEG2000 information is obtained.
static String LENGTH_PARAMETER
          Generic parameter names used by both JP2_Info and JPEG20000_Codestream_Info
static String POSITION_PARAMETER
          Generic parameter names used by both JP2_Info and JPEG20000_Codestream_Info
protected  boolean Skip_Tiles
          Flag for skipping tile segments.
static boolean Skip_Tiles_Default
          Default flag for skipping tile segments.
protected  long Stream_Position
          The current read position of the Source file.
protected  boolean Throw_Illegal_State
          Flag for throwing an IllegalStateException when the Source is found to contain an invalid box or segment organization or contents.
static boolean Throw_Illegal_State_Default
          Default flag for throwing an IllegalStateException when the Source is found to contain an invalid box or segment organization or contents.
static String TOTAL_COMPONENTS_PARAMETER
          Generic parameter names used by both JP2_Info and JPEG20000_Codestream_Info
static String UNKNOWN
           
protected  boolean Use_Data_Position
          Flag for using data position parameters in preference to data offset parameters.
static boolean Use_Data_Position_Default
          Default flag for using data position parameters in preference to data offset parameters.
static String VALUE_BITS_PARAMETER
          Parameter name for specifying the bit precision of a value.
static String WARNING_PARAMETER
           
 
Fields inherited from class PIRL.PVL.Parameter
AGGREGATE, ASSIGNMENT, BEGIN_GROUP, BEGIN_OBJECT, END, END_AGGREGATE, END_GROUP, END_OBJECT, END_PVL, GROUP, HIGHEST_BIT, LOWEST_BIT, MASK, OBJECT, TOKEN
 
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
 
Constructor Summary
JPEG2000_Info()
          Construct a an empty JPEG2000_Info Object.
JPEG2000_Info(File file)
          Construct a JPEG2000_Info for a File.
JPEG2000_Info(ImageInputStream image_input_stream)
          Construct a JPEG2000_Info for an ImageInputStream.
JPEG2000_Info(String source)
          Construct a JPEG2000_Info for a named source.
 
Method Summary
protected  void Data_Offset_Parameters(Parameter group, long start_offset, long end_offset)
          Add data offset Parameters to a Parameter Group.
protected  void Data_Position_Parameters(Parameter group, long end_position)
          Add data position Parameters to a Parameter Group.
static int[] int_Array(Parameter parameter)
          Get the Array Value of a Parameter as an int array.
 int[] int_Array(String parameter_name)
          Get the Array Value of a Parameter as an int array.
static int[] int_Array(Value value)
          Convert an Array Value to an int array.
protected  int Read_byte(String description)
          Get the next byte data value from the Source.
protected  int Read_int(String description)
          Get the next int data value from the Source.
protected  long Read_long(String description)
          Get the next long data value from the Source.
protected  int Read_short(String description)
          Get the next short data value from the Source.
protected  String Read_String(String description, long end_position)
          Get a String from the Source.
protected  int Read_Unsigned_byte(String description)
          Get the next byte data value from the Source as an unsigned integer.
protected  long Read_Unsigned_int(String description)
          Get the next int data value from the Source as an unsigned integer.
protected  int Read_Unsigned_short(String description)
          Get the next short data value from the Source as an unsigned integer.
protected  long Read_Value(String description, int bits)
          Get a value of some bits precision from the Source.
 boolean Skip_Tiles()
          Test if tile segments will be skipped.
 JPEG2000_Info Skip_Tiles(boolean enabled)
          Enable of disable skipping of tile segments.
 ImageInputStream Source()
          Get the currently assigned ImageInputStream information source.
 JPEG2000_Info Source(File file)
          Assign a File as the information source.
 JPEG2000_Info Source(ImageInputStream image_input_stream)
          Assign an ImageInputStream as the information source.
 JPEG2000_Info Source(String source)
          Assign a named file as the information source.
 long Stream_Position()
          Get the current source stream position.
protected  void Stream_Position(long position)
          Set the stream position of the information Source.
 boolean Throw_Illegal_State()
          Test if IllegalStateException will be thrown when an invalid JP2 box or codestream segment structure or contents is encountered.
 JPEG2000_Info Throw_Illegal_State(boolean enabled)
          Enable or disable throwing of IllegalStateException when an invalid JP2 box or codestream segment structure or contents is encountered.
 boolean Use_Data_Position()
          Test if Source data position parameters will be used.
 JPEG2000_Info Use_Data_Position(boolean enabled)
          Enable or disable the use of Source data position parameters.
protected  Parameter Value_Bits_Parameter(String description, long end_position)
          Generate a VALUE_BITS_PARAMETER from the source.
protected static Parameter Value_Bits_Parameter(Value array)
          Generate a VALUE_BITS_PARAMETER from an Array of raw Values.
 
Methods inherited from class PIRL.PVL.Parameter
Absolute_Pathname, Absolute_Pathname, Add, add, Add, Add, adopt, Basename, Classification_Name, Classification_Name, Classification, Classification, Classification, clone, Comments, Comments, Data, Data, Data, Description, Description, equals, equalsIgnoreCase, Find, Find, Find, Find, Find, Find, Find, Find, Find, Find, Find, Find, First_Warning, First_Warning, graft, Has_List, Has_Value, Insert, insert, Insert, Is_Absolute_Pathname, Is_Aggregate, Is_Aggregate, Is_Assignment, Is_Assignment, Is_Begin_Aggregate, Is_Begin_Aggregate, Is_Begin_Group, Is_Begin_Group, Is_Begin_Object, Is_Begin_Object, Is_Empty, Is_End_Aggregate, Is_End_Aggregate, Is_End_Group, Is_End_Group, Is_End_Object, Is_End_Object, Is_End_PVL, Is_End_PVL, Is_End, Is_End, Is_Group, Is_Group, Is_Object, Is_Object, Is_Parameter_List, Is_Parameter_Value, Is_Parameter, Is_Token, Is_Token, Is_Unknown, Is_Unknown, iterator, iterator, Last_Warning, Last_Warning, List_Size, List, List, listIterator, listIterator, Match_Depth, Match, Name, Name, orphan, Parent_Pathname, Parent, Path_Delimiter, Path_Delimiter, Path_from, Path_Name, Path_to_Name, Remove_All, remove, Remove, remove, Remove, Reset_Warning, set_classification, set_data, setAllowsChildren, setUserObject, toString, Value, Value, Value, Value, Value, Value, Value, Value, Value, Warning, Write, Write, Write, Write, Write, Write, Write, Write
 
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode
breadthFirstEnumeration, children, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, removeAllChildren, removeFromParent, setParent
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ID

public static final String ID
Class identification name with source code version and date.

See Also:
Constant Field Values

DATA_POSITION_PARAMETER

public static final String DATA_POSITION_PARAMETER
Parameter name for specifying the position of data in the Source file (byte offset from the beginning of the file).

See Also:
Constant Field Values

DATA_OFFSET_PARAMETER

public static final String DATA_OFFSET_PARAMETER
Parameter name for specifying a data block offset in an enclosing object.

For JP2 boxes, the offset is relative to the byte immediately following the box header's length, type and extended length (if present) fields.

For codestream segements, the offset is relative to the byte immediately following the segment marker and length fields.

See Also:
Constant Field Values

DATA_LENGTH_PARAMETER

public static final String DATA_LENGTH_PARAMETER
Parameter name for specifying the length (bytes) of a data block.

See Also:
Constant Field Values

VALUE_BITS_PARAMETER

public static final String VALUE_BITS_PARAMETER
Parameter name for specifying the bit precision of a value.

See Also:
Constant Field Values

BITS_VARIABLE

public static final int BITS_VARIABLE
Value of a bit precision Parameter value when the number of bits is variable.

See Also:
Constant Field Values

LENGTH_PARAMETER

public static final String LENGTH_PARAMETER
Generic parameter names used by both JP2_Info and JPEG20000_Codestream_Info

See Also:
Constant Field Values

POSITION_PARAMETER

public static final String POSITION_PARAMETER
Generic parameter names used by both JP2_Info and JPEG20000_Codestream_Info

See Also:
Constant Field Values

TOTAL_COMPONENTS_PARAMETER

public static final String TOTAL_COMPONENTS_PARAMETER
Generic parameter names used by both JP2_Info and JPEG20000_Codestream_Info

See Also:
Constant Field Values

WARNING_PARAMETER

public static final String WARNING_PARAMETER
See Also:
Constant Field Values

UNKNOWN

public static final String UNKNOWN
See Also:
Constant Field Values

Image_Input_Stream

protected ImageInputStream Image_Input_Stream
The ImageInputStream Source from which the JPEG2000 information is obtained.

See Also:
Source()

Stream_Position

protected long Stream_Position
The current read position of the Source file.

See Also:
Stream_Position()

Skip_Tiles_Default

public static boolean Skip_Tiles_Default
Default flag for skipping tile segments.

See Also:
Skip_Tiles(boolean)

Skip_Tiles

protected boolean Skip_Tiles
Flag for skipping tile segments.

See Also:
Skip_Tiles(boolean)

Use_Data_Position_Default

public static boolean Use_Data_Position_Default
Default flag for using data position parameters in preference to data offset parameters.

See Also:
Use_Data_Position(boolean)

Use_Data_Position

protected boolean Use_Data_Position
Flag for using data position parameters in preference to data offset parameters.

See Also:
Use_Data_Position(boolean)

Throw_Illegal_State_Default

public static boolean Throw_Illegal_State_Default
Default flag for throwing an IllegalStateException when the Source is found to contain an invalid box or segment organization or contents.
See Also:
Throw_Illegal_State(boolean)

Throw_Illegal_State

protected boolean Throw_Illegal_State
Flag for throwing an IllegalStateException when the Source is found to contain an invalid box or segment organization or contents.
See Also:
Throw_Illegal_State(boolean)
Constructor Detail

JPEG2000_Info

public JPEG2000_Info(String source)
              throws IOException,
                     UnknownHostException,
                     IllegalArgumentException
Construct a JPEG2000_Info for a named source.

Parameters:
source - The source from which to obtain the JPEG2000_Info. This may be a local filename or a remote URL reference.
Throws:
UnknownHostException - If the source is a URL but the hostname is specifies can not be resolved.
IllegalArgumentException - If the source is a URL but does not specify the http protocol or a source pathname.
IOException - If there was a problem reading the file.

JPEG2000_Info

public JPEG2000_Info(File file)
              throws IOException
Construct a JPEG2000_Info for a File.

Parameters:
file - The File from which to obtain the JPEG2000_Info.
Throws:
IOException - If there was a problem reading the file.

JPEG2000_Info

public JPEG2000_Info(ImageInputStream image_input_stream)
Construct a JPEG2000_Info for an ImageInputStream.

Parameters:
image_input_stream - The ImageInputStream from which to obtain the JPEG2000_Info.
Throws:
IOException - If there was a problem reading the file.

JPEG2000_Info

public JPEG2000_Info()
Construct a an empty JPEG2000_Info Object.

Use one of the Source methods to assign a source file.

Method Detail

Source

public JPEG2000_Info Source(String source)
                     throws IOException,
                            UnknownHostException,
                            IllegalArgumentException
Assign a named file as the information source.

An attempt is made to form a URL from the source. If this succeeds an HTTP_ImageInput_Stream is constructed from the URL and then delegated to the Source(ImageInputStream) method.

If a URL can not be formed from the source a File is constructed from the source and then delegated to the Source(File) method.

Parameters:
source - The name of the source to use as the information source.
Returns:
This JPEG2000_Info.
Throws:
UnknownHostException - If the source is a URL but the hostname is specifies can not be resolved.
IllegalArgumentException - If the source is a URL but does not specify the http protocol or a source pathname.
FileNotFoundException - If the file could not be accessed for any reason.
ProtocolException - If the source is a valid URL but an HTTP Status protocol error was returned by the server.
IOException - If there was a problem reading the source.

Source

public JPEG2000_Info Source(File file)
                     throws IOException
Assign a File as the information source.

The name of this JPEG2000_Info is set to the canonical pathname of the File.

An ImageInputStream is constructed from the file and then delegated to the Source(ImageInputStream) method.

Parameters:
file - The File to use as the information source.
Returns:
This JPEG2000_Info.
Throws:
FileNotFoundException - If the file could not be accessed for any reason.
IOException - If there was a problem reading the file.

Source

public JPEG2000_Info Source(ImageInputStream image_input_stream)
Assign an ImageInputStream as the information source.

If the image_input_stream is null or identical to the currently assigned ImageInputStream nothing is done.

If this JPEG2000_Info does not have a name it is set to "ImageInputStream". All Parameters are removed. The current stream position is determined.

Parameters:
image_input_stream - The ImageInputStream to use as the information source.
Returns:
This JPEG2000_Info.

Source

public ImageInputStream Source()
Get the currently assigned ImageInputStream information source.

Returns:
The currently assigned ImageInputStream. This will be null if no source has been assigned.

Skip_Tiles

public JPEG2000_Info Skip_Tiles(boolean enabled)
Enable of disable skipping of tile segments.

When a codestream is being scanned for segment markers the tile-part segments - which begin with a Start-Of_Tile (SOT) marker - may be skipped. When there are many tiles in the codestream this will significantly reduce the amount of time to scan the Source and the number of Parameter groups generated.

Parameters:
enabled - If true, tile-part segments will be skipped; otherwise all tile-part segments will be examined and Parameter groups assembled for each one.
Returns:
This JPEG2000_Info.

Skip_Tiles

public boolean Skip_Tiles()
Test if tile segments will be skipped.

Returns:
true if tile segments will be skipped; false otherwise.
See Also:
Skip_Tiles(boolean)

Use_Data_Position

public JPEG2000_Info Use_Data_Position(boolean enabled)
Enable or disable the use of Source data position parameters.

Parameters:
enabled - If true, Source data position parameters are included for all JP2 boxes and codestream segments, and used elsewhere. Otherwise position parameters are not included and data offset parameters are used elsewhere instead of position parameters.
Returns:
This JPEG2000_Info.

Use_Data_Position

public boolean Use_Data_Position()
Test if Source data position parameters will be used.

Returns:
true if Source data position parameters will be used; false otherwise.
See Also:
Use_Data_Position(boolean)

Throw_Illegal_State

public JPEG2000_Info Throw_Illegal_State(boolean enabled)
Enable or disable throwing of IllegalStateException when an invalid JP2 box or codestream segment structure or contents is encountered.

Parameters:
enabled - If true an IllegalStateException will be thrown at the point where the JP2 box or codestream segment structure is determined to be invalid.
Returns:
This JPEG2000_Info.

Throw_Illegal_State

public boolean Throw_Illegal_State()
Test if IllegalStateException will be thrown when an invalid JP2 box or codestream segment structure or contents is encountered.

Returns:
true if IllegalStateException will be thrown when an invalid JP2 box or codestream segment structure or contents is encountered; false otherwise.
See Also:
Throw_Illegal_State(boolean)

Read_long

protected long Read_long(String description)
                  throws IOException
Get the next long data value from the Source.

The current stream position is updated.

Parameters:
description - A String describing the value being obtained.
Returns:
The next long data value from the Source.
Throws:
IOException - If there was a problem reading from the Source.

Read_int

protected int Read_int(String description)
                throws IOException
Get the next int data value from the Source.

The current stream position is updated.

Parameters:
description - A String describing the value being obtained.
Returns:
The next int data value from the Source.
Throws:
IOException - If there was a problem reading from the Source.

Read_Unsigned_int

protected long Read_Unsigned_int(String description)
                          throws IOException
Get the next int data value from the Source as an unsigned integer.

The next int value read from the Source is cast as a long value but without sign extension.

The current stream position is updated.

Parameters:
description - A String describing the value being obtained.
Returns:
A long value of the next int from the Source as an unsigned integer value.
Throws:
IOException - If there was a problem reading from the Source.

Read_short

protected int Read_short(String description)
                  throws IOException
Get the next short data value from the Source.

The current stream position is updated.

Parameters:
description - A String describing the value being obtained.
Returns:
An int value of the next short from the Source as a signed integer value.
Throws:
IOException - If there was a problem reading from the Source.

Read_Unsigned_short

protected int Read_Unsigned_short(String description)
                           throws IOException
Get the next short data value from the Source as an unsigned integer.

The next short value read from the Source is cast as an int value but without sign extension.

The current stream position is updated.

Parameters:
description - A String describing the value being obtained.
Returns:
An int value of the next short from the Source as an unsigned integer value.
Throws:
IOException - If there was a problem reading from the Source.

Read_byte

protected int Read_byte(String description)
                 throws IOException
Get the next byte data value from the Source.

The current stream position is updated.

Parameters:
description - A String describing the value being obtained.
Returns:
The next byte data value, as an int with sign extension from the byte, from the Source.
Throws:
IOException - If there was a problem reading from the Source.

Read_Unsigned_byte

protected int Read_Unsigned_byte(String description)
                          throws IOException
Get the next byte data value from the Source as an unsigned integer.

The current stream position is updated.

Parameters:
description - A String describing the value being obtained.
Returns:
An int value of the next byte from the Source as an unsigned integer value.
Throws:
IOException - If there was a problem reading from the Source.

Read_Value

protected long Read_Value(String description,
                          int bits)
                   throws IOException
Get a value of some bits precision from the Source.

If the number of bits is negative the most significant bit of the value is treated as a sign bit (extended in the returned value) and the actual precision of the value is abs (bits). The Source stream is read starting at the current stream position. Bytes are read from the stream starting with the most significant byte of the value with the most significant bits right justified in this first byte; the least significant bit is presumed to be the least significant bit of the last byte read. The bytes read are concatenated to form the value that is returned.

The current stream position is updated.

Parameters:
description - A String describing the value being obtained.
bits - The precision of the value is abs (bits). Negative bits means the value is signed; i.e. the most significant bit is the sign bit.
Returns:
The value obtained as a long. Thus a maximum of 64 bits may be obtained. As a special case, if bits is 0, 0 is returned.
Throws:
IOException - If there was a problem reading the value bytes from the Source stream.
ArithmeticException - If abs (bits) > 64.

Read_String

protected String Read_String(String description,
                             long end_position)
                      throws IOException
Get a String from the Source.

Starting at the current stream position bytes are read up to, but not including, the end position. Each byte read is concatenated as a character in the resultant String with unprintable characters being expanded into printable escape sequences. However, if the last character is null it is not included in the String.

The current stream position is updated.

Parameters:
description - A String describing the value being obtained.
end_position - The end position in the Source after the last byte to be read.
Returns:
A String representing the bytes read from the source.
Throws:
IOException - If there was a problem reading from the Source.

Stream_Position

protected void Stream_Position(long position)
                        throws IOException
Set the stream position of the information Source.

If the specified position is the same as the current position of the Source, nothing is done. Otherwise the current position of the Source is changed to the specified position.

Parameters:
position - The position, as a byte offset from the beginning of the file, to which to reposition the image Source stream. This value must be a non-negative value less than the size of the Source file, otherwise an IOException will be thrown.
Throws:
IOException - If the Source stream could not be repositioned. An attempt will be made to reset the Source stream to return it to the last marked position before the exception is thrown.

Stream_Position

public long Stream_Position()
Get the current source stream position.

Returns:
The current source stream position as a byte offset from the beginning of the file.

Data_Position_Parameters

protected void Data_Position_Parameters(Parameter group,
                                        long end_position)
                                 throws IllegalArgumentException
Add data position Parameters to a Parameter Group.

A DATA_POSITION_PARAMETER is added to the group with the current stream position as its value. A DATA_LENGTH_PARAMETER is also added to the group with the number of bytes between the current stream position (inclusive) and the end position (exclusive) as its value.

N.B.: If using data position parameters is disabled data offset parameters will be used instead for the same values.

Parameters:
group - The Parameter Group (Aggregate) to receive the data location parameters.
end_position - The end position in the Source of the data as a byte offset from the beginning of the file to the byte immediately following the last byte of the data segement. If this value is not greater than zero no DATA_LENGTH_PARAMETER is included.
Throws:
IllegalArgumentException - If the current stream position is greater than the data end position.
See Also:
Data_Offset_Parameters(Parameter, long, long)

Data_Offset_Parameters

protected void Data_Offset_Parameters(Parameter group,
                                      long start_offset,
                                      long end_offset)
                               throws IllegalArgumentException
Add data offset Parameters to a Parameter Group.

A DATA_OFFSET_PARAMETER is added to the group followed by a a DATA_LENGTH_PARAMETER.

Parameters:
group - The Parameter Group (Aggregate) to receive the data offset parameters.
start_offset - The offset (in bytes relative to 0) of the data location - excluding segment marker and length elements - in the enclosing object.
end_offset - The offset of the end (byte immediately following the last data byte) of the data block. If this value is not greater than zero no DATA_LENGTH_PARAMETER is included.
Throws:
IllegalArgumentException - If the data start offser is greater than the end offset. #Stream_Position() stream position} is greater than the data end position.
See Also:
Data_Position_Parameters(Parameter, long)

Value_Bits_Parameter

protected Parameter Value_Bits_Parameter(String description,
                                         long end_position)
                                  throws IOException
Generate a VALUE_BITS_PARAMETER from the source.

Signed byte values are read from the Source starting at the current stream position up to, but not including, the end position. The value is incremented by 1. If the byte value read is negative only the least significant 7 bits are valid; the resultant value is the negative of the value of these bits. A negative value signals that the values whose bit precision is the absolute of the value is a signed value. A value of zero signals that the actual precision values are indictated elsewhere.

Each value read is added to an Array Value that is assigned to a Parameter named VALUE_BITS_PARAMETER which is what is returned.

Parameters:
description - A String describing the values being obtained.
end_position - The end position in the Source of the values as a byte offset from the beginning of the file to the byte immediately following the last byte to be read.
Returns:
An Assignment Parameter named VALUE_BITS_PARAMETER that has an Array Value with the adjust values read from the Source.
Throws:
IOException - If there was a problem reading from the Source.

Value_Bits_Parameter

protected static Parameter Value_Bits_Parameter(Value array)
Generate a VALUE_BITS_PARAMETER from an Array of raw Values.

The datum of each Value in the array is assumed to be a raw bit precision value. This value is incremented by 1. If the value is negative the least significant 7 bits are taken and then negated to signal that the image values are signed. The image value precision of each component is the absolute value of the corresponding entry in the array.

The resultant Array is assigned to a Parameter named VALUE_BITS_PARAMETER which is what is returned.

Parameters:
array - A Array Value containing raw bit precision values.
Returns:
An Assignment Parameter named VALUE_BITS_PARAMETER that has a Value that is an Array of the adjusted array values.

int_Array

public int[] int_Array(String parameter_name)
Get the Array Value of a Parameter as an int array.

Parameters:
parameter_name - The name of the parameter to use. The first Parameter found with this name, which may be a pathname, is used.
Returns:
An int array.
See Also:
int_Array(Parameter)

int_Array

public static int[] int_Array(Parameter parameter)
Get the Array Value of a Parameter as an int array.

Parameters:
parameter - The Parameter from which to obtain Array Values.
Returns:
An int array.
See Also:
int_Array(Value)

int_Array

public static int[] int_Array(Value value)
Convert an Array Value to an int array.

Each Integer Value in the Array Value is used to set the respective value of an int array. Any Value in the Array that is not an Integer is ignored; Sub-Array Values are not entered.

Parameters:
value - The Array Value to convert.
Returns:
An int array. N.B.: The number of elements in the array may be less than the number of Values in the Parameter's Array if it contains non-Integer Values. If the Parameter is not an Assignment or its Value is not an Array an empty array will be returned.

PIRL

Copyright (C) \ 2003-2009 Bradford Castalia, University of Arizona