Class ArrayWithOffset
public final class ArrayWithOffset
{
// Constructors
public ArrayWithOffset( Object objArray, int nOffsetBytes );
public ArrayWithOffset( byte[] array, int nOffsetBytes );
public ArrayWithOffset( short[] array, int nOffsetBytes );
public ArrayWithOffset( int[] array, int nOffsetBytes );
public ArrayWithOffset( long[] array, int nOffsetBytes );
public ArrayWithOffset( float[] array, int nOffsetBytes );
public ArrayWithOffset( double[] array, int nOffsetBytes );
public ArrayWithOffset( char[] array, int nOffsetBytes );
public ArrayWithOffset( boolean[] array, int nOffsetBytes );
// Methods
public Object getArray();
public int getOffset();
}
This class is used to encapsulate a pointer into an array, for use with Microsoft® J/Direct methods. When used as a parameter to a J/Direct method, an object of type ArrayWithOffset will be marshaled to a pointer to the given byte offset in the given array. No bounds checks are performed on the offset given in the constructor. Objects of type ArrayWithOffset are immutableonce created, they cannot be modifed.
Constructors
public ArrayWithOffset( Object objArray, int nOffsetBytes );
Generic; expects an array of primitive type and an offset in bytes.
public ArrayWithOffset( byte[] array, int nOffsetBytes );
Expects a byte array and an offset in bytes.
public ArrayWithOffset( short[] array, int nOffsetBytes );
Expects a short array and an offset in bytes.
public ArrayWithOffset( int[] array, int nOffsetBytes );
Expects an integer array and an offset in bytes.
public ArrayWithOffset( long[] array, int nOffsetBytes );
Expects a long array and an offset in bytes.
public ArrayWithOffset( float[] array, int nOffsetBytes );
Expects a float array and an offset in bytes.
public ArrayWithOffset( double[] array, int nOffsetBytes );
Expects a double array and an offset in bytes.
public ArrayWithOffset( char[] array, int nOffsetBytes );
Expects a character array and an offset in bytes.
public ArrayWithOffset( boolean[] array, int nOffsetBytes );
Expects a boolean array and an offset in bytes.
Methods
public Object getArray();
Retrieves the wrapped array.
public int getOffset();
Retrieves the offset, in bytes.