com.jacob.com
Class SafeArray

java.lang.Object
  extended by com.jacob.com.JacobObject
      extended by com.jacob.com.SafeArray

public class SafeArray
extends JacobObject

This creates an array wrapper around Variant objects(?). This supports 1, 2 and n-dimensional arrays. It exists in this form because n-dimensional arrays were a later addition.


Constructor Summary
SafeArray()
          Constructor.
SafeArray(int vt)
          Constructor.
SafeArray(int vt, int celems)
          Constructor for a single dimensional array whose lower bounds is 0 and whose upper bound is specified as a parameter
SafeArray(int vt, int[] lbounds, int[] celems)
          Constructor with support for N-dimensional array support
SafeArray(int vt, int celems1, int celems2)
          Creates a two dimensional SafeArray whose base indexes are 0.
SafeArray(String s)
          convert a string to a VT_UI1 array
 
Method Summary
 String asString()
          convert a VT_UI1 array to string
 Object clone()
           
protected  void finalize()
          
 void fromBooleanArray(boolean[] ja)
          populate the safe array from the passed in array of data
 void fromByteArray(byte[] ja)
          populate the safe array from the passed in array of data
 void fromCharArray(char[] ja)
          populate the safe array from the passed in array of data
 void fromDoubleArray(double[] ja)
          populate the safe array from the passed in array of data
 void fromFloatArray(float[] ja)
          populate the safe array from the passed in array of data
 void fromIntArray(int[] ja)
          populate the safe array from the passed in array of data
 void fromLongArray(long[] ja)
          populate the safe array from the passed in array of data
 void fromShortArray(short[] ja)
          populate the safe array from the passed in array of data
 void fromStringArray(String[] ja)
          populate the safe array from the passed in array of data
 void fromVariantArray(Variant[] ja)
          populate the safe array from the passed in array of data
 boolean getBoolean(int sa_idx)
          boolean access
 boolean getBoolean(int[] indices)
          get boolean value from N-dimensional array
 boolean getBoolean(int sa_idx1, int sa_idx2)
          boolean access
 void getBooleans(int sa_idx, int nelems, boolean[] ja, int ja_start)
          boolean access
 byte getByte(int sa_idx)
          byte access
 byte getByte(int[] indices)
          get byte value from N-dimensional array
 byte getByte(int sa_idx1, int sa_idx2)
          byte access
 void getBytes(int sa_idx, int nelems, byte[] ja, int ja_start)
          Fills byte array from contents of this array
 char getChar(int sa_idx)
          char access
 char getChar(int[] indices)
          get char value from N-dimensional array
 char getChar(int sa_idx1, int sa_idx2)
          char access
 void getChars(int sa_idx, int nelems, char[] ja, int ja_start)
          char access
 double getDouble(int sa_idx)
          double access
 double getDouble(int[] indices)
          get double value from N-dimensional array
 double getDouble(int sa_idx1, int sa_idx2)
          double access
 void getDoubles(int sa_idx, int nelems, double[] ja, int ja_start)
          double access
 int getElemSize()
           
 int getFeatures()
           
 float getFloat(int sa_idx)
          float access
 float getFloat(int[] indices)
          get float value from N-dimensional array
 float getFloat(int sa_idx1, int sa_idx2)
          float access
 void getFloats(int sa_idx, int nelems, float[] ja, int ja_start)
          float access
 int getInt(int sa_idx)
          get int from an single dimensional array
 int getInt(int[] indices)
          get int value from N-dimensional array
 int getInt(int sa_idx1, int sa_idx2)
          get int from 2 dimensional array
 void getInts(int sa_idx, int nelems, int[] ja, int ja_start)
          retrieves a group of ints from a single dimensional array
 int getLBound()
           
 int getLBound(int dim)
           
 long getLong(int sa_idx)
          get int from an single dimensional array
 long getLong(int[] indices)
          get long value from N-dimensional array
 long getLong(int sa_idx1, int sa_idx2)
          get long from 2 dimensional array
 void getLongs(int sa_idx, int nelems, long[] ja, int ja_start)
          retrieves a group of longs from a single dimensional array
 int getNumDim()
           
 int getNumLocks()
          not implemented.
 short getShort(int sa_idx)
          short access
 short getShort(int[] indices)
          get short value from N-dimensional array
 short getShort(int sa_idx1, int sa_idx2)
          short access
 void getShorts(int sa_idx, int nelems, short[] ja, int ja_start)
          short access
 String getString(int sa_idx)
          string access
 String getString(int[] indices)
          get String value from N-dimensional array
 String getString(int sa_idx1, int sa_idx2)
          string access
 void getStrings(int sa_idx, int nelems, String[] ja, int ja_start)
          string access
 int getUBound()
           
 int getUBound(int dim)
           
 Variant getVariant(int sa_idx)
          variant access
 Variant getVariant(int[] indices)
          get Variant value from N-dimensional array
 Variant getVariant(int sa_idx1, int sa_idx2)
          variant access
 void getVariants(int sa_idx, int nelems, Variant[] ja, int ja_start)
          variant access
 int getvt()
           
protected  void init(int vt, int[] lbounds, int[] celems)
           
 void reinit(SafeArray sa)
          Does anyone want to document this?
 void reinterpretType(int vt)
          Does anyone want to document this?
 void safeRelease()
          Finalizers call this method.
 void setBoolean(int[] indices, boolean c)
          set boolean value in N-dimensional array
 void setBoolean(int sa_idx, boolean c)
          boolean access
 void setBoolean(int sa_idx1, int sa_idx2, boolean c)
          boolean access
 void setBooleans(int sa_idx, int nelems, boolean[] ja, int ja_start)
          boolean access
 void setByte(int[] indices, byte c)
          set byte value in N-dimensional array
 void setByte(int sa_idx, byte c)
          byte access
 void setByte(int sa_idx1, int sa_idx2, byte c)
          byte access
 void setBytes(int sa_idx, int nelems, byte[] ja, int ja_start)
          fills array with passed in bytes
 void setChar(int[] indices, char c)
          set char value in N-dimensional array
 void setChar(int sa_idx, char c)
          char access
 void setChar(int sa_idx1, int sa_idx2, char c)
          char access
 void setChars(int sa_idx, int nelems, char[] ja, int ja_start)
          char access
 void setDouble(int[] indices, double c)
          set double value in N-dimensional array
 void setDouble(int sa_idx, double c)
          double access
 void setDouble(int sa_idx1, int sa_idx2, double c)
          double access
 void setDoubles(int sa_idx, int nelems, double[] ja, int ja_start)
          double access
 void setFloat(int[] indices, float c)
          set float value in N-dimensional array
 void setFloat(int sa_idx, float c)
          float access
 void setFloat(int sa_idx1, int sa_idx2, float c)
          float access
 void setFloats(int sa_idx, int nelems, float[] ja, int ja_start)
          float access
 void setInt(int[] indices, int c)
          set int value in N-dimensional array
 void setInt(int sa_idx, int c)
          sets the int value of an element in a single dimensional array
 void setInt(int sa_idx1, int sa_idx2, int c)
          sets the int value of a 2 dimensional array
 void setInts(int sa_idx, int nelems, int[] ja, int ja_start)
          sets a group of ints into a single dimensional array
 void setLong(int[] indices, long c)
          set long value in N-dimensional array
 void setLong(int sa_idx1, int sa_idx2, long c)
          sets the long value of a 2 dimensional array
 void setLong(int sa_idx, long c)
          sets the long value of an element in a single dimensional array
 void setLongs(int sa_idx, int nelems, long[] ja, int ja_start)
          sets a group of longs into a single dimensional array
 void setShort(int[] indices, short c)
          set short value in N-dimensional array
 void setShort(int sa_idx1, int sa_idx2, short c)
          short access
 void setShort(int sa_idx, short c)
          short access
 void setShorts(int sa_idx, int nelems, short[] ja, int ja_start)
          short access
 void setString(int[] indices, String c)
          set Stringvalue in N-dimensional array
 void setString(int sa_idx1, int sa_idx2, String c)
          puts a string into an element in a two dimensional array.
 void setString(int sa_idx, String c)
          puts a string into an element in a single dimensional safe array
 void setStrings(int sa_idx, int nelems, String[] ja, int ja_start)
          string access
 void setVariant(int[] indices, Variant v)
          set Variant value in N-dimensional array
 void setVariant(int sa_idx1, int sa_idx2, Variant c)
          variant access
 void setVariant(int sa_idx, Variant c)
          variant access
 void setVariants(int sa_idx, int nelems, Variant[] ja, int ja_start)
          variant access
 boolean[] toBooleanArray()
          Retrieves the data from the array cast to a Java data type
 byte[] toByteArray()
          Retrieves the data from the array cast to a Java data type
 char[] toCharArray()
          Retrieves the data from the array cast to a Java data type
 double[] toDoubleArray()
          Retrieves the data from the array cast to a Java data type
 float[] toFloatArray()
          Retrieves the data from the array cast to a Java data type
 int[] toIntArray()
          Retrieves the data from the array cast to a Java data type
 long[] toLongArray()
          Retrieves the data from the array cast to a Java data type
 short[] toShortArray()
          Retrieves the data from the array cast to a Java data type
 String toString()
          Standard toString() Warning, this creates new Variant objects!
 String[] toStringArray()
          Retrieves the data from the array cast to a Java data type
 Variant[] toVariantArray()
          Retrieves the data from the array cast to a Java data type
 
Methods inherited from class com.jacob.com.JacobObject
debug, getBuildDate, getBuildVersion, isDebugEnabled
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SafeArray

public SafeArray()
Constructor. Why does this exist? Yeah, someone will post on sourceforge about this comment.


SafeArray

public SafeArray(int vt)
Constructor.

Parameters:
vt - type of array

SafeArray

public SafeArray(int vt,
                 int celems)
Constructor for a single dimensional array whose lower bounds is 0 and whose upper bound is specified as a parameter

Parameters:
vt - type of the array
celems - length of the array

SafeArray

public SafeArray(int vt,
                 int celems1,
                 int celems2)
Creates a two dimensional SafeArray whose base indexes are 0.

Parameters:
vt - Type of the array
celems1 - length of the array in first dimension
celems2 - length of the array in second dimension

SafeArray

public SafeArray(int vt,
                 int[] lbounds,
                 int[] celems)
Constructor with support for N-dimensional array support

You create an N-D SafeArray by: SafeArray sa = new SafeArray(Variant.VariantVariant, new int[] {0,0,0,0}, new int[] {4,4,4,4}); Where the 1st array is lower bounds and 2nd has the lengths of each dimension *

Parameters:
vt -
lbounds -
celems -

SafeArray

public SafeArray(String s)
convert a string to a VT_UI1 array

Parameters:
s - source string
Method Detail

asString

public String asString()
convert a VT_UI1 array to string

Returns:
variant byte as a string

clone

public Object clone()
Overrides:
clone in class Object

finalize

protected void finalize()

Overrides:
finalize in class Object

fromBooleanArray

public void fromBooleanArray(boolean[] ja)
populate the safe array from the passed in array of data

Parameters:
ja -

fromByteArray

public void fromByteArray(byte[] ja)
populate the safe array from the passed in array of data

Parameters:
ja -

fromCharArray

public void fromCharArray(char[] ja)
populate the safe array from the passed in array of data

Parameters:
ja -

fromDoubleArray

public void fromDoubleArray(double[] ja)
populate the safe array from the passed in array of data

Parameters:
ja -

fromFloatArray

public void fromFloatArray(float[] ja)
populate the safe array from the passed in array of data

Parameters:
ja -

fromIntArray

public void fromIntArray(int[] ja)
populate the safe array from the passed in array of data

Parameters:
ja -

fromLongArray

public void fromLongArray(long[] ja)
populate the safe array from the passed in array of data

Parameters:
ja -

fromShortArray

public void fromShortArray(short[] ja)
populate the safe array from the passed in array of data

Parameters:
ja -

fromStringArray

public void fromStringArray(String[] ja)
populate the safe array from the passed in array of data

Parameters:
ja -

fromVariantArray

public void fromVariantArray(Variant[] ja)
populate the safe array from the passed in array of data

Parameters:
ja -

getBoolean

public boolean getBoolean(int sa_idx)
boolean access

Parameters:
sa_idx -
Returns:
boolean representation

getBoolean

public boolean getBoolean(int[] indices)
get boolean value from N-dimensional array

Parameters:
indices - - length must equal Dimension of SafeArray
Returns:
the value at the specified location

getBoolean

public boolean getBoolean(int sa_idx1,
                          int sa_idx2)
boolean access

Parameters:
sa_idx1 -
sa_idx2 -
Returns:
boolean representation

getBooleans

public void getBooleans(int sa_idx,
                        int nelems,
                        boolean[] ja,
                        int ja_start)
boolean access

Parameters:
sa_idx -
nelems -
ja -
ja_start -

getByte

public byte getByte(int sa_idx)
byte access

Parameters:
sa_idx -
Returns:
byte representaton

getByte

public byte getByte(int[] indices)
get byte value from N-dimensional array

Parameters:
indices - - length must equal Dimension of SafeArray
Returns:
the value at the specified location

getByte

public byte getByte(int sa_idx1,
                    int sa_idx2)
byte access

Parameters:
sa_idx1 -
sa_idx2 -
Returns:
byte representation

getBytes

public void getBytes(int sa_idx,
                     int nelems,
                     byte[] ja,
                     int ja_start)
Fills byte array from contents of this array

Parameters:
sa_idx -
nelems -
ja -
ja_start -

getChar

public char getChar(int sa_idx)
char access

Parameters:
sa_idx -
Returns:
single character rpeesentation

getChar

public char getChar(int[] indices)
get char value from N-dimensional array

Parameters:
indices - - length must equal Dimension of SafeArray
Returns:
the value at the specified location

getChar

public char getChar(int sa_idx1,
                    int sa_idx2)
char access

Parameters:
sa_idx1 -
sa_idx2 -
Returns:
single character representation

getChars

public void getChars(int sa_idx,
                     int nelems,
                     char[] ja,
                     int ja_start)
char access

Parameters:
sa_idx -
nelems -
ja -
ja_start -

getDouble

public double getDouble(int sa_idx)
double access

Parameters:
sa_idx -
Returns:
double stored in array

getDouble

public double getDouble(int[] indices)
get double value from N-dimensional array

Parameters:
indices - - length must equal Dimension of SafeArray
Returns:
the value at the specified location

getDouble

public double getDouble(int sa_idx1,
                        int sa_idx2)
double access

Parameters:
sa_idx1 -
sa_idx2 -
Returns:
double stored in array

getDoubles

public void getDoubles(int sa_idx,
                       int nelems,
                       double[] ja,
                       int ja_start)
double access

Parameters:
sa_idx -
nelems -
ja -
ja_start -

getElemSize

public int getElemSize()
Returns:
the size of each element?

getFeatures

public int getFeatures()
Returns:
The ??features of the array?

getFloat

public float getFloat(int sa_idx)
float access

Parameters:
sa_idx -
Returns:
float held in array at location

getFloat

public float getFloat(int[] indices)
get float value from N-dimensional array

Parameters:
indices - - length must equal Dimension of SafeArray
Returns:
the value at the specified location

getFloat

public float getFloat(int sa_idx1,
                      int sa_idx2)
float access

Parameters:
sa_idx1 -
sa_idx2 -
Returns:
float held in array at location

getFloats

public void getFloats(int sa_idx,
                      int nelems,
                      float[] ja,
                      int ja_start)
float access

Parameters:
sa_idx -
nelems -
ja -
ja_start -

getInt

public int getInt(int sa_idx)
get int from an single dimensional array

Parameters:
sa_idx - array index
Returns:
int stored in array

getInt

public int getInt(int[] indices)
get int value from N-dimensional array

Parameters:
indices - - length must equal Dimension of SafeArray
Returns:
the value at the specified location

getInt

public int getInt(int sa_idx1,
                  int sa_idx2)
get int from 2 dimensional array

Parameters:
sa_idx1 - array index first dimension
sa_idx2 - array index of second dimension
Returns:
int stored in array

getInts

public void getInts(int sa_idx,
                    int nelems,
                    int[] ja,
                    int ja_start)
retrieves a group of ints from a single dimensional array

Parameters:
sa_idx - the index in the array to start the get
nelems - number of elements to retrieve
ja - the structure to be filled with the ints
ja_start - the start point in the java int array to start filling

getLong

public long getLong(int sa_idx)
get int from an single dimensional array

Parameters:
sa_idx - array index
Returns:
long stored in array

getLong

public long getLong(int[] indices)
get long value from N-dimensional array

Parameters:
indices - - length must equal Dimension of SafeArray
Returns:
the value at the specified location

getLong

public long getLong(int sa_idx1,
                    int sa_idx2)
get long from 2 dimensional array

Parameters:
sa_idx1 - array index first dimension
sa_idx2 - array index of second dimension
Returns:
long stored in array

getLongs

public void getLongs(int sa_idx,
                     int nelems,
                     long[] ja,
                     int ja_start)
retrieves a group of longs from a single dimensional array

Parameters:
sa_idx - the index in the array to start the get
nelems - number of elements to retrieve
ja - the structure to be filled with the longs
ja_start - the start point in the java longs array to start filling

getLBound

public int getLBound()
Returns:
The lower bounds of the array?

getLBound

public int getLBound(int dim)
Parameters:
dim - the dimension we are checking in a multidimensional array
Returns:
The lower bounds of the array?

getNumDim

public int getNumDim()
Returns:
The number of dimensions in this array

getNumLocks

public int getNumLocks()
not implemented.

Returns:
0

getShort

public short getShort(int sa_idx)
short access

Parameters:
sa_idx -
Returns:
short stored in array

getShort

public short getShort(int[] indices)
get short value from N-dimensional array

Parameters:
indices - - length must equal Dimension of SafeArray
Returns:
the value at the specified location

getShort

public short getShort(int sa_idx1,
                      int sa_idx2)
short access

Parameters:
sa_idx1 -
sa_idx2 -
Returns:
short stored in array

getShorts

public void getShorts(int sa_idx,
                      int nelems,
                      short[] ja,
                      int ja_start)
short access

Parameters:
sa_idx -
nelems -
ja -
ja_start -

getString

public String getString(int sa_idx)
string access

Parameters:
sa_idx -
Returns:
String stored in array

getString

public String getString(int[] indices)
get String value from N-dimensional array

Parameters:
indices - - length must equal Dimension of SafeArray
Returns:
the value at the specified location

getString

public String getString(int sa_idx1,
                        int sa_idx2)
string access

Parameters:
sa_idx1 -
sa_idx2 -
Returns:
String stored in array

getStrings

public void getStrings(int sa_idx,
                       int nelems,
                       String[] ja,
                       int ja_start)
string access

Parameters:
sa_idx -
nelems -
ja -
ja_start -

getUBound

public int getUBound()
Returns:
The upper bounds of the array?

getUBound

public int getUBound(int dim)
Parameters:
dim - the dimension we are checking in a multidimensional array
Returns:
The upper bounds of the array?

getVariant

public Variant getVariant(int sa_idx)
variant access

Parameters:
sa_idx -
Returns:
Variant held in location in the array?

getVariant

public Variant getVariant(int[] indices)
get Variant value from N-dimensional array

Parameters:
indices - - length must equal Dimension of SafeArray
Returns:
the value at the specified location

getVariant

public Variant getVariant(int sa_idx1,
                          int sa_idx2)
variant access

Parameters:
sa_idx1 -
sa_idx2 -
Returns:
Variant held in a location in the array?

getVariants

public void getVariants(int sa_idx,
                        int nelems,
                        Variant[] ja,
                        int ja_start)
variant access

Parameters:
sa_idx -
nelems -
ja -
ja_start -

getvt

public int getvt()
Returns:
the Variant type

init

protected void init(int vt,
                    int[] lbounds,
                    int[] celems)

reinit

public void reinit(SafeArray sa)
Does anyone want to document this?

Parameters:
sa -

reinterpretType

public void reinterpretType(int vt)
Does anyone want to document this?

Parameters:
vt - the variant type?

safeRelease

public void safeRelease()
Finalizers call this method. This method should release any COM data structures in a way that it can be called multiple times. This can happen if someone manually calls this and then a finalizer calls it.

Overrides:
safeRelease in class JacobObject

setBoolean

public void setBoolean(int sa_idx,
                       boolean c)
boolean access

Parameters:
sa_idx -
c -

setBoolean

public void setBoolean(int[] indices,
                       boolean c)
set boolean value in N-dimensional array

Parameters:
indices - - length must equal Dimension of SafeArray
c -

setBoolean

public void setBoolean(int sa_idx1,
                       int sa_idx2,
                       boolean c)
boolean access

Parameters:
sa_idx1 -
sa_idx2 -
c -

setBooleans

public void setBooleans(int sa_idx,
                        int nelems,
                        boolean[] ja,
                        int ja_start)
boolean access

Parameters:
sa_idx -
nelems -
ja -
ja_start -

setByte

public void setByte(int sa_idx,
                    byte c)
byte access

Parameters:
sa_idx -
c -

setByte

public void setByte(int[] indices,
                    byte c)
set byte value in N-dimensional array

Parameters:
indices - - length must equal Dimension of SafeArray
c -

setByte

public void setByte(int sa_idx1,
                    int sa_idx2,
                    byte c)
byte access

Parameters:
sa_idx1 -
sa_idx2 -
c -

setBytes

public void setBytes(int sa_idx,
                     int nelems,
                     byte[] ja,
                     int ja_start)
fills array with passed in bytes

Parameters:
sa_idx -
nelems -
ja -
ja_start -

setChar

public void setChar(int sa_idx,
                    char c)
char access

Parameters:
sa_idx -
c -

setChar

public void setChar(int[] indices,
                    char c)
set char value in N-dimensional array

Parameters:
indices - - length must equal Dimension of SafeArray
c -

setChar

public void setChar(int sa_idx1,
                    int sa_idx2,
                    char c)
char access

Parameters:
sa_idx1 -
sa_idx2 -
c -

setChars

public void setChars(int sa_idx,
                     int nelems,
                     char[] ja,
                     int ja_start)
char access

Parameters:
sa_idx -
nelems -
ja -
ja_start -

setDouble

public void setDouble(int sa_idx,
                      double c)
double access

Parameters:
sa_idx -
c -

setDouble

public void setDouble(int[] indices,
                      double c)
set double value in N-dimensional array

Parameters:
indices - - length must equal Dimension of SafeArray
c -

setDouble

public void setDouble(int sa_idx1,
                      int sa_idx2,
                      double c)
double access

Parameters:
sa_idx1 -
sa_idx2 -
c -

setDoubles

public void setDoubles(int sa_idx,
                       int nelems,
                       double[] ja,
                       int ja_start)
double access

Parameters:
sa_idx -
nelems -
ja -
ja_start -

setFloat

public void setFloat(int sa_idx,
                     float c)
float access

Parameters:
sa_idx -
c -

setFloat

public void setFloat(int[] indices,
                     float c)
set float value in N-dimensional array

Parameters:
indices - - length must equal Dimension of SafeArray
c -

setFloat

public void setFloat(int sa_idx1,
                     int sa_idx2,
                     float c)
float access

Parameters:
sa_idx1 -
sa_idx2 -
c -

setFloats

public void setFloats(int sa_idx,
                      int nelems,
                      float[] ja,
                      int ja_start)
float access

Parameters:
sa_idx -
nelems -
ja -
ja_start -

setInt

public void setInt(int sa_idx,
                   int c)
sets the int value of an element in a single dimensional array

Parameters:
sa_idx - index into the array
c - the value to be set

setInt

public void setInt(int[] indices,
                   int c)
set int value in N-dimensional array

Parameters:
indices - - length must equal Dimension of SafeArray
c -

setInt

public void setInt(int sa_idx1,
                   int sa_idx2,
                   int c)
sets the int value of a 2 dimensional array

Parameters:
sa_idx1 - index on the first dimension
sa_idx2 - index on the second dimension
c - the value to be set

setInts

public void setInts(int sa_idx,
                    int nelems,
                    int[] ja,
                    int ja_start)
sets a group of ints into a single dimensional array

Parameters:
sa_idx - the index of the start of the array to put into
nelems - number of elements to be copied
ja - the new int values to be put into the array
ja_start - the start index in the array that we are copying into SafeArray

setLong

public void setLong(int sa_idx,
                    long c)
sets the long value of an element in a single dimensional array

Parameters:
sa_idx - index into the array
c - the value to be set

setLong

public void setLong(int[] indices,
                    long c)
set long value in N-dimensional array

Parameters:
indices - - length must equal Dimension of SafeArray
c -

setLong

public void setLong(int sa_idx1,
                    int sa_idx2,
                    long c)
sets the long value of a 2 dimensional array

Parameters:
sa_idx1 - index on the first dimension
sa_idx2 - index on the second dimension
c - the value to be set

setLongs

public void setLongs(int sa_idx,
                     int nelems,
                     long[] ja,
                     int ja_start)
sets a group of longs into a single dimensional array

Parameters:
sa_idx - the index of the start of the array to put into
nelems - number of elements to be copied
ja - the new long values to be put into the array
ja_start - the start index in the array that we are copying into SafeArray

setShort

public void setShort(int sa_idx1,
                     int sa_idx2,
                     short c)
short access

Parameters:
sa_idx1 -
sa_idx2 -
c -

setShort

public void setShort(int sa_idx,
                     short c)
short access

Parameters:
sa_idx -
c -

setShort

public void setShort(int[] indices,
                     short c)
set short value in N-dimensional array

Parameters:
indices - - length must equal Dimension of SafeArray
c -

setShorts

public void setShorts(int sa_idx,
                      int nelems,
                      short[] ja,
                      int ja_start)
short access

Parameters:
sa_idx -
nelems -
ja -
ja_start -

setString

public void setString(int sa_idx1,
                      int sa_idx2,
                      String c)
puts a string into an element in a two dimensional array.

Parameters:
sa_idx1 -
sa_idx2 -
c -

setString

public void setString(int sa_idx,
                      String c)
puts a string into an element in a single dimensional safe array

Parameters:
sa_idx -
c -

setString

public void setString(int[] indices,
                      String c)
set Stringvalue in N-dimensional array

Parameters:
indices - - length must equal Dimension of SafeArray
c -

setStrings

public void setStrings(int sa_idx,
                       int nelems,
                       String[] ja,
                       int ja_start)
string access

Parameters:
sa_idx -
nelems -
ja -
ja_start -

setVariant

public void setVariant(int sa_idx1,
                       int sa_idx2,
                       Variant c)
variant access

Parameters:
sa_idx1 -
sa_idx2 -
c -

setVariant

public void setVariant(int sa_idx,
                       Variant c)
variant access

Parameters:
sa_idx -
c -

setVariant

public void setVariant(int[] indices,
                       Variant v)
set Variant value in N-dimensional array

Parameters:
indices - - length must equal Dimension of SafeArray
v -

setVariants

public void setVariants(int sa_idx,
                        int nelems,
                        Variant[] ja,
                        int ja_start)
variant access

Parameters:
sa_idx -
nelems -
ja -
ja_start -

toBooleanArray

public boolean[] toBooleanArray()
Retrieves the data from the array cast to a Java data type

Returns:
boolean[] array of booleans contained in this collection

toByteArray

public byte[] toByteArray()
Retrieves the data from the array cast to a Java data type

Returns:
byte[] byte array contained in this collection

toCharArray

public char[] toCharArray()
Retrieves the data from the array cast to a Java data type

Returns:
char[] character array contained in this collection

toDoubleArray

public double[] toDoubleArray()
Retrieves the data from the array cast to a Java data type

Returns:
double[] double array contained in this collection

toFloatArray

public float[] toFloatArray()
Retrieves the data from the array cast to a Java data type

Returns:
float[] array of float contained in this collection

toIntArray

public int[] toIntArray()
Retrieves the data from the array cast to a Java data type

Returns:
int[] int array contained in this collection

toLongArray

public long[] toLongArray()
Retrieves the data from the array cast to a Java data type

Returns:
long[] long array contained in this collection

toShortArray

public short[] toShortArray()
Retrieves the data from the array cast to a Java data type

Returns:
short[] short array contained in this collection

toString

public String toString()
Standard toString() Warning, this creates new Variant objects!

Overrides:
toString in class Object
Returns:
String contents of variant

toStringArray

public String[] toStringArray()
Retrieves the data from the array cast to a Java data type

Returns:
String[] String array contained in this collection

toVariantArray

public Variant[] toVariantArray()
Retrieves the data from the array cast to a Java data type

Returns:
Variant[] array of variants contained in this collection


http://jacob-project.sourceforge.net