All Packages Class Hierarchy This Package Previous Next Index
Class quicktime.util.QTHandleRef
java.lang.Object
|
+----quicktime.QTObject
|
+----quicktime.util.QTHandleRef
- public class QTHandleRef
- extends QTObject
- implements QuickTimeLib
A QTHandleRef is a "smart" handle in that it can be either a Reference to a handle
which is not disposable, or it can be a real "independent" handle which is
automatically disposed on finalization.
The default setting is for the Handle to be disposable - subclasses must use the
QTHandleRef(int, Object) constructor to create a non-disposable reference
For non-disposable handles there are two situations to look out for:
(1) Upon finalization the handle should NOT be disposed - it belongs to a parent struct
(2) The parent object from which the handle 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.
When defining a clone operation subclasses should define it as:
public Object clone() { return new QTHandleSubclass (makeAndCopyHandle (), null); }
-
copyFromArray(int, byte[], int, int)
- An efficient byte[] copy that copies length bytes from the byte array to
the handle.
-
copyFromArray(int, char[], int, int)
- An efficient char[] copy that copies length chars from the byte array to
the handle.
-
copyFromArray(int, double[], int, int)
- An efficient double[] copy that copies length doubles from the byte array to
the handle.
-
copyFromArray(int, float[], int, int)
- An efficient float[] copy that copies length floats from the byte array to
the handle.
-
copyFromArray(int, int[], int, int)
- An efficient int[] copy that copies length ints from the byte array to
the handle.
-
copyFromArray(int, long[], int, int)
- An efficient long[] copy that copies length longs from the byte array to
the handle.
-
copyFromArray(int, short[], int, int)
- An efficient short[] copy that copies length shorts from the byte array to
the handle.
-
copyToArray(int, byte[], int, int)
- An efficient byte[] copy that copies length bytes from the handle to the
byte array.
-
copyToArray(int, char[], int, int)
- An efficient char[] copy that copies length chars from the handle to the
char array.
-
copyToArray(int, double[], int, int)
- An efficient double[] copy that copies length doubles from the handle to the
double array.
-
copyToArray(int, float[], int, int)
- An efficient float[] copy that copies length floats from the handle to the
float array.
-
copyToArray(int, int[], int, int)
- An efficient int[] copy that copies length ints from the handle to the
int array.
-
copyToArray(int, long[], int, int)
- An efficient long[] copy that copies length longs from the handle to the
long array.
-
copyToArray(int, short[], int, int)
- An efficient short[] copy that copies length shorts from the handle to the
short array.
-
fromCompressionDialogState(CompressionDialog)
- Retrieves all of the settings for a dialog.
-
fromSCSequence(SCSequence, QDGraphics, QDRect)
- Compresses a frame that is sourced by a PixMap from the supplied QDGraphics, returning
the compressed data.
-
getBytes()
-
Returns a copy of the data of the handle as a byte array
-
getSize()
- This method returns the size (number of bytes) of the handle
QuickTime::GetHandleSize
-
inMemory()
- checks this handles purgedness
-
isLocked()
- Returns true if the handle is locked otherwise false.
-
lock()
- Locks the relocatable block.
-
lockHigh()
- Moves the relocatable block to the top of the heap and locks it.
-
moveHigh()
-
Move the handle to high memory.
-
toQTPointer()
- Locks the handle and returns a pointer object.
-
toQTPointer(int, int)
- Locks the handle and returns a pointer object.
-
toString()
- A String representation of the class.
-
unlock()
- Unlocks the relocatable block.
fromSCSequence
public static SCInfo fromSCSequence(SCSequence sc,
QDGraphics src,
QDRect srcRect) throws QTException
- Compresses a frame that is sourced by a PixMap from the supplied QDGraphics, returning
the compressed data.
QuickTime::SCCompressSequenceFrame()
- Parameters:
- src - the PixMap's source QDGraphics.
- srcRect - you can specify to compress just a part of the pix map by specifying
a rectangle - or pass in null to compress the entire pix map.
- Returns:
- an image data object.
fromCompressionDialogState
public static QTHandleRef fromCompressionDialogState(CompressionDialog cd) throws QTException
- Retrieves all of the settings for a dialog.
QuickTime::SCRequestImageSettings()
- See Also:
- getInfoState
getSize
public int getSize()
- This method returns the size (number of bytes) of the handle
QuickTime::GetHandleSize
- Returns:
- the size of the handle
getBytes
public byte[] getBytes()
- Returns a copy of the data of the handle as a byte array
- Returns:
- a byte array - copy of handle data
copyToArray
public final void copyToArray(int handleOffset,
byte destArray[],
int destOffset,
int length)
- An efficient byte[] copy that copies length bytes from the handle to the
byte array.
- Parameters:
- handleOffset - the byte offset from the handle 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 handleOffset,
short destArray[],
int destOffset,
int length)
- An efficient short[] copy that copies length shorts from the handle to the
short array.
- Parameters:
- handleOffset - the byte offset from the handle 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 handleOffset,
char destArray[],
int destOffset,
int length)
- An efficient char[] copy that copies length chars from the handle to the
char array.
- Parameters:
- handleOffset - the byte offset from the handle 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 handleOffset,
int destArray[],
int destOffset,
int length)
- An efficient int[] copy that copies length ints from the handle to the
int array.
- Parameters:
- handleOffset - the byte offset from the handle 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 handleOffset,
float destArray[],
int destOffset,
int length)
- An efficient float[] copy that copies length floats from the handle to the
float array.
- Parameters:
- handleOffset - the byte offset from the handle 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 handleOffset,
long destArray[],
int destOffset,
int length)
- An efficient long[] copy that copies length longs from the handle to the
long array.
- Parameters:
- handleOffset - the byte offset from the handle 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 handleOffset,
double destArray[],
int destOffset,
int length)
- An efficient double[] copy that copies length doubles from the handle to the
double array.
- Parameters:
- handleOffset - the byte offset from the handle 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 handleOffset,
byte srcArray[],
int srcOffset,
int length)
- An efficient byte[] copy that copies length bytes from the byte array to
the handle.
- Parameters:
- handleOffset - how many bytes offset from the base handle 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 handleOffset,
short srcArray[],
int srcOffset,
int length)
- An efficient short[] copy that copies length shorts from the byte array to
the handle.
- Parameters:
- handleOffset - how many bytes offset from the base handle to copy to.
- srcArray - the short[] to copy
- srcOffset - the nth index within the short array to start copying from
- length - how many elements of the short array to copy
copyFromArray
public final void copyFromArray(int handleOffset,
char srcArray[],
int srcOffset,
int length)
- An efficient char[] copy that copies length chars from the byte array to
the handle.
- Parameters:
- handleOffset - how many bytes offset from the base handle to copy to.
- srcArray - the char[] to copy
- srcOffset - the nth index within the char array to start copying from
- length - how many elements of the char array to copy
copyFromArray
public final void copyFromArray(int handleOffset,
int srcArray[],
int srcOffset,
int length)
- An efficient int[] copy that copies length ints from the byte array to
the handle.
- Parameters:
- handleOffset - how many bytes offset from the base handle to copy to.
- srcArray - the int[] to copy
- srcOffset - the nth index within the int array to start copying from
- length - how many elements of the int array to copy
copyFromArray
public final void copyFromArray(int handleOffset,
float srcArray[],
int srcOffset,
int length)
- An efficient float[] copy that copies length floats from the byte array to
the handle.
- Parameters:
- handleOffset - how many bytes offset from the base handle to copy to.
- srcArray - the float[] to copy
- srcOffset - the nth index within the float array to start copying from
- length - how many elements of the float array to copy
copyFromArray
public final void copyFromArray(int handleOffset,
long srcArray[],
int srcOffset,
int length)
- An efficient long[] copy that copies length longs from the byte array to
the handle.
- Parameters:
- handleOffset - how many bytes offset from the base handle to copy to.
- srcArray - the long[] to copy
- srcOffset - the nth index within the long array to start copying from
- length - how many elements of the long array to copy
copyFromArray
public final void copyFromArray(int handleOffset,
double srcArray[],
int srcOffset,
int length)
- An efficient double[] copy that copies length doubles from the byte array to
the handle.
- Parameters:
- handleOffset - how many bytes offset from the base handle to copy to.
- srcArray - the double[] to copy
- srcOffset - the nth index within the double array to start copying from
- length - how many elements of the double array to copy
inMemory
public boolean inMemory()
- checks this handles purgedness
isLocked
public final boolean isLocked()
- Returns true if the handle is locked otherwise false.
lock
public final void lock()
- Locks the relocatable block.
unlock
public final void unlock()
- Unlocks the relocatable block.
lockHigh
public void lockHigh()
- Moves the relocatable block to the top of the heap and locks it.
QuickTime::HLockHi QuickTime::HLockHi
moveHigh
public final void moveHigh()
- Move the handle to high memory. Typically you call this before locking a small
handle that is going to be locked for a short period of time.
QuickTime::MoveHHi QuickTime::MoveHHi
toString
public String toString()
- A String representation of the class.
- Overrides:
- toString in class QTObject
toQTPointer
public QTPointerRef toQTPointer()
- Locks the handle and returns a pointer object. You must keep the handle locked for
the lifetime of the returned pointer.
- Returns:
- an object representing the pointer.
toQTPointer
public QTPointerRef toQTPointer(int offset,
int size)
- Locks the handle and returns a pointer object. The handle should remain locked
for the lifetime of the returned pointer. It will return a pointer that is
offset within the handle that has a valid access to size bytes from the offset
- Parameters:
- offset - the number of bytes to offset within the handle
- size - the number of bytes the pointer has valid access to.
- Returns:
- an object representing the pointer.
All Packages Class Hierarchy This Package Previous Next Index