All Packages Class Hierarchy This Package Previous Next Index
Class quicktime.util.QTPointerRef
java.lang.Object
|
+----quicktime.QTObject
|
+----quicktime.util.QTPointerRef
- public class QTPointerRef
- extends QTObject
- implements QuickTimeLib
A QTPointerRef is a "smart" pointer in that it can be either a Reference to a pointer
which is not disposable, or it can be a real "independent" pointer which is
automatically disposed on finalization.
The default setting is for the Ptr to be disposable - you must use the
QTPointerRef(int, int, Object) constructor to create a non-disposable reference
For non-disposable Pointers there are two situations to look out for:
(1) Upon finalization the pointer should NOT be disposed - it belongs to a parent struct
(2) The parent object from which the pointer is obtained should not be allowed to
go away whilst the reference object is alive.
In both situations we must maintain a reference to the parent or owner object.
-
copyFromArray(int, byte[], int, int)
- An efficient byte[] copy that copies length bytes from the byte array to
the pointer.
-
copyFromArray(int, char[], int, int)
- An efficient char[] copy that copies length chars from the char array to
the pointer.
-
copyFromArray(int, double[], int, int)
- An efficient double[] copy that copies length doubles from the double array to
the pointer.
-
copyFromArray(int, float[], int, int)
- An efficient float[] copy that copies length floats from the float array to
the pointer.
-
copyFromArray(int, int[], int, int)
- An efficient int[] copy that copies length ints from the int array to
the pointer.
-
copyFromArray(int, long[], int, int)
- An efficient long[] copy that copies length longs from the long array to
the pointer.
-
copyFromArray(int, short[], int, int)
- An efficient short[] copy that copies length shorts from the short array to
the pointer.
-
copyToArray(int, byte[], int, int)
- An efficient byte[] copy that copies length bytes from the pointer to the
byte array.
-
copyToArray(int, char[], int, int)
- An efficient char[] copy that copies length chars from the pointer to the
char array.
-
copyToArray(int, double[], int, int)
- An efficient double[] copy that copies length doubles from the pointer to the
double array.
-
copyToArray(int, float[], int, int)
- An efficient float[] copy that copies length floats from the pointer to the
float array.
-
copyToArray(int, int[], int, int)
- An efficient int[] copy that copies length ints from the pointer to the
int array.
-
copyToArray(int, long[], int, int)
- An efficient long[] copy that copies length longs from the pointer to the
long array.
-
copyToArray(int, short[], int, int)
- An efficient short[] copy that copies length shorts from the pointer to the
short array.
-
getBytes()
-
Returns a copy of the data of the pointer as a byte array
-
getSize()
- Returns the size of the QTPionter
-
toString()
- A String representation of the class.
getSize
public int getSize()
- Returns the size of the QTPionter
getBytes
public byte[] getBytes()
- Returns a copy of the data of the pointer as a byte array
- Returns:
- a byte array - copy of pointer data
copyToArray
public final void copyToArray(int ptrOffset,
byte destArray[],
int destOffset,
int length)
- An efficient byte[] copy that copies length bytes from the pointer to the
byte array.
- Parameters:
- ptrOffset - the byte offset from the pointer to copy the bytes from
- destArray - the destination byte array
- destOffset - the offset within the byte array to start copying to
- length - the number of bytes to copy
copyToArray
public final void copyToArray(int ptrOffset,
short destArray[],
int destOffset,
int length)
- An efficient short[] copy that copies length shorts from the pointer to the
short array.
- Parameters:
- ptrOffset - the byte offset from the pointer to copy the shorts from
- destArray - the destination short array
- destOffset - the offset within the short array to start copying to
- length - the number of shorts to copy
copyToArray
public final void copyToArray(int ptrOffset,
char destArray[],
int destOffset,
int length)
- An efficient char[] copy that copies length chars from the pointer to the
char array.
- Parameters:
- ptrOffset - the byte offset from the pointer to copy the chars from
- destArray - the destination char array
- destOffset - the offset within the char array to start copying to
- length - the number of chars to copy
copyToArray
public final void copyToArray(int ptrOffset,
int destArray[],
int destOffset,
int length)
- An efficient int[] copy that copies length ints from the pointer to the
int array.
- Parameters:
- ptrOffset - the byte offset from the pointer to copy the ints from
- destArray - the destination int array
- destOffset - the offset within the int array to start copying to
- length - the number of ints to copy
copyToArray
public final void copyToArray(int ptrOffset,
float destArray[],
int destOffset,
int length)
- An efficient float[] copy that copies length floats from the pointer to the
float array.
- Parameters:
- ptrOffset - the byte offset from the pointer to copy the floats from
- destArray - the destination float array
- destOffset - the offset within the float array to start copying to
- length - the number of floats to copy
copyToArray
public final void copyToArray(int ptrOffset,
long destArray[],
int destOffset,
int length)
- An efficient long[] copy that copies length longs from the pointer to the
long array.
- Parameters:
- ptrOffset - the byte offset from the pointer to copy the longs from
- destArray - the destination long array
- destOffset - the offset within the long array to start copying to
- length - the number of longs to copy
copyToArray
public final void copyToArray(int ptrOffset,
double destArray[],
int destOffset,
int length)
- An efficient double[] copy that copies length doubles from the pointer to the
double array.
- Parameters:
- ptrOffset - the byte offset from the pointer to copy the doubles from
- destArray - the destination double array
- destOffset - the offset within the double array to start copying to
- length - the number of doubles to copy
copyFromArray
public final void copyFromArray(int ptrOffset,
byte srcArray[],
int srcOffset,
int length)
- An efficient byte[] copy that copies length bytes from the byte array to
the pointer.
- Parameters:
- ptrOffset - how many bytes offset from the base pointer to copy to.
- srcArray - the byte[] to copy
- srcOffset - the nth index within the byte [] to start copying from
- length - how many elements of the byte array to copy
copyFromArray
public final void copyFromArray(int ptrOffset,
short srcArray[],
int srcOffset,
int length)
- An efficient short[] copy that copies length shorts from the short array to
the pointer.
- Parameters:
- ptrOffset - how many bytes offset from the base pointer to copy to.
- srcArray - the short[] to copy
- srcOffset - the nth index within the short [] to start copying from
- length - how many elements of the short array to copy
copyFromArray
public final void copyFromArray(int ptrOffset,
char srcArray[],
int srcOffset,
int length)
- An efficient char[] copy that copies length chars from the char array to
the pointer.
- Parameters:
- ptrOffset - how many bytes offset from the base pointer to copy to.
- srcArray - the char[] to copy
- srcOffset - the nth index within the char [] to start copying from
- length - how many elements of the char array to copy
copyFromArray
public final void copyFromArray(int ptrOffset,
int srcArray[],
int srcOffset,
int length)
- An efficient int[] copy that copies length ints from the int array to
the pointer.
- Parameters:
- ptrOffset - how many bytes offset from the base pointer to copy to.
- srcArray - the int[] to copy
- srcOffset - the nth index within the int [] to start copying from
- length - how many elements of the int array to copy
copyFromArray
public final void copyFromArray(int ptrOffset,
float srcArray[],
int srcOffset,
int length)
- An efficient float[] copy that copies length floats from the float array to
the pointer.
- Parameters:
- ptrOffset - how many bytes offset from the base pointer to copy to.
- srcArray - the float[] to copy
- srcOffset - the nth index within the float [] to start copying from
- length - how many elements of the float array to copy
copyFromArray
public final void copyFromArray(int ptrOffset,
long srcArray[],
int srcOffset,
int length)
- An efficient long[] copy that copies length longs from the long array to
the pointer.
- Parameters:
- ptrOffset - how many bytes offset from the base pointer to copy to.
- srcArray - the long[] to copy
- srcOffset - the nth index within the long [] to start copying from
- length - how many elements of the long array to copy
copyFromArray
public final void copyFromArray(int ptrOffset,
double srcArray[],
int srcOffset,
int length)
- An efficient double[] copy that copies length doubles from the double array to
the pointer.
- Parameters:
- ptrOffset - how many bytes offset from the base pointer to copy to.
- srcArray - the double[] to copy
- srcOffset - the nth index within the double [] to start copying from
- length - how many elements of the double array to copy
toString
public String toString()
- A String representation of the class.
- Overrides:
- toString in class QTObject
All Packages Class Hierarchy This Package Previous Next Index