quicktime.util
Class QTPointer

java.lang.Object
  |
  +--quicktime.QTObject
        |
        +--quicktime.util.QTPointerRef
              |
              +--quicktime.util.QTPointer
All Implemented Interfaces:
java.lang.Cloneable, quicktime.jdirect.InterfaceLib, quicktime.jdirect.PrimitivesLib, quicktime.jdirect.QuickTimeLib, quicktime.jdirect.SharedLibrary, com.apple.jdirect.SharedLibrary
Direct Known Subclasses:
RawEncodedImage

public class QTPointer
extends QTPointerRef
implements quicktime.jdirect.QuickTimeLib, java.lang.Cloneable

The QTPointer class implements a pointer that can be used in calls to QuickTime.


Fields inherited from interface quicktime.jdirect.QuickTimeLib
JDirect_MacOSX, libraryInstance, name
 
Constructor Summary
QTPointer(byte[] byteArray)
          Construct a pointer from input data.
QTPointer(int size, boolean clear)
          Allocate a pointer for general use.
QTPointer(QTHandleRef hdl, int offset, int size)
          This constructor is used to create a QTPointer object from a Handle.
QTPointer(QTPointerRef firstPtr, QTPointerRef secondPtr)
          Construct a pointer from the concatenation of the two supplied pointers.
 
Method Summary
 java.lang.Object clone()
          Returns a copy of this object
 void concatenate(QTPointerRef ptr)
          Concatenates the supplied pointer to this pointer.
static QTPointer fromEncodedImage(EncodedImage image)
          Returns EncodedImage data as a QTPointer.
static QTPointerRef fromGraphicsExporter(GraphicsExporter ge)
          The buffer that contains the sound data.
static QTPointer fromSCData(SoundComponentData scd)
          The buffer that contains the sound data.
 void setSize(int newSize)
          This method will resize the memory that a pointer points to.
 
Methods inherited from class quicktime.util.QTPointerRef
copyFromArray, copyFromArray, copyFromArray, copyFromArray, copyFromArray, copyFromArray, copyFromArray, copyToArray, copyToArray, copyToArray, copyToArray, copyToArray, copyToArray, copyToArray, getBytes, getSize, toString
 
Methods inherited from class quicktime.QTObject
disposeQTObject, equals, ID
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QTPointer

public QTPointer(int size,
                 boolean clear)
          throws QTException
Allocate a pointer for general use.
Parameters:
size - the size of the pointer to create.
clear - clear the pointer upon creation.

QTPointer

public QTPointer(byte[] byteArray)
          throws QTException
Construct a pointer from input data.
Parameters:
byteArray - the input data.

QTPointer

public QTPointer(QTHandleRef hdl,
                 int offset,
                 int size)
          throws QTException
This constructor is used to create a QTPointer object from a Handle. The contents of the handle will be copied into the pointer. This will copy size bytes from the handle + offset. It will bounds check the size to be not greater than the size of the handle.
Parameters:
hdl - the handle to copy.
offset - you can specify an offset within the handle from which to copy the data
size - the amount of bytes to copy

QTPointer

public QTPointer(QTPointerRef firstPtr,
                 QTPointerRef secondPtr)
          throws QTException
Construct a pointer from the concatenation of the two supplied pointers. The First pointer will appear first in the concatentated result.
Parameters:
firstPtr - the first Pointer
secondPtr - the second Pointer
Method Detail

fromGraphicsExporter

public static QTPointerRef fromGraphicsExporter(GraphicsExporter ge)
                                         throws StdQTException
The buffer that contains the sound data.

QuickTime::GraphicsExportGetInputPtr

Returns:
the QTPointer buffer
See Also:
quicktime.std.image.GraphicsExporter.getInputPtr

fromSCData

public static QTPointer fromSCData(SoundComponentData scd)
The buffer that contains the sound data.
Returns:
the QTPointer buffer
See Also:
SoundComponentData.getBuffer()

fromEncodedImage

public static QTPointer fromEncodedImage(EncodedImage image)
                                  throws QTException
Returns EncodedImage data as a QTPointer. This will copy the data if the source is an int or byte encoded image, but will return the same object if it is a RawEncodedImage.
Parameters:
image - the encoded image data
Returns:
the encoded image data as a Pointer

clone

public java.lang.Object clone()
Returns a copy of this object

setSize

public void setSize(int newSize)
             throws UtilException
This method will resize the memory that a pointer points to. This operation can fail if memory cannot increase its size

QuickTime::SetPtrSize

Parameters:
newSize - the new size

concatenate

public void concatenate(QTPointerRef ptr)
                 throws UtilException
Concatenates the supplied pointer to this pointer. This operation will fail if unable to resize the pointer.