quicktime.std.movies
Class AtomData

java.lang.Object
  |
  +--quicktime.QTObject
        |
        +--quicktime.util.QTPointerRef
              |
              +--quicktime.std.movies.AtomData
All Implemented Interfaces:
quicktime.jdirect.InterfaceLib, quicktime.jdirect.PrimitivesLib, quicktime.jdirect.QuickTimeLib, quicktime.jdirect.SharedLibrary, com.apple.jdirect.SharedLibrary

public final class AtomData
extends QTPointerRef
implements quicktime.jdirect.QuickTimeLib

This is a Read Only structure that is used to read the values that are stored in an atom of an AtomContainer. To store or alter these values you should use the appropriate methods in the AtomContainer class.


Fields inherited from interface quicktime.jdirect.QuickTimeLib
JDirect_MacOSX, libraryInstance, name
 
Method Summary
static AtomData fromVectorStream(Curve c, VectorStream vectorStream, int atomType)
          This method is used to find the first atom of a specified type within a vector data stream and get its data.
 byte getByte(int offset)
          Get the byte value at the given position(offset) within the native object.
 byte[] getBytes(int offset, int length)
          Returns the byte values at the given position(offset) within the object's memory area.
 java.lang.String getCString(int offset)
          Returns the C string found at the offset as a java.lang.String
 double getDouble(int offset)
          Get the double value at the given position(offset) within the native object.
 float getFloat(int offset)
          Get the float value at the given position(offset) within the native object.
 int getInt(int offset)
          Get the int value at the given position(offset) within the native object.
 long getLong(int offset)
          Get the long value at the given position(offset) within the native object.
 java.lang.String getPString(int offset)
          Returns the Pascal string found at the offset as a java.lang.String
 short getShort(int offset)
          Get the short value at the given position(offset) within the native object.
 
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
 

Method Detail

fromVectorStream

public static AtomData fromVectorStream(Curve c,
                                        VectorStream vectorStream,
                                        int atomType)
                                 throws StdQTException
This method is used to find the first atom of a specified type within a vector data stream and get its data.

QuickTime::CurveGetAtomDataFromVectorStream

Parameters:
vectorStream - Contains a handle to the vector data stream from which to get the atom.
atomType - Specifies the type of atom to find.
Returns:
the atom's data.

getByte

public byte getByte(int offset)
             throws java.lang.IndexOutOfBoundsException
Get the byte value at the given position(offset) within the native object.
Parameters:
offset - the given number of bytes to offset
Returns:
the byte value at the offset.
Throws:
java.lang.IndexOutOfBoundsException - is thrown if the offset is larger than the size of the data

getShort

public short getShort(int offset)
               throws java.lang.IndexOutOfBoundsException
Get the short value at the given position(offset) within the native object.
Parameters:
offset - the given number of bytes to offset
Returns:
the short value at the offset.
Throws:
java.lang.IndexOutOfBoundsException - is thrown if the offset is larger than the size of the data

getInt

public int getInt(int offset)
           throws java.lang.IndexOutOfBoundsException
Get the int value at the given position(offset) within the native object.
Parameters:
offset - the given number of bytes to offset
Returns:
the int value at the offset.
Throws:
java.lang.IndexOutOfBoundsException - is thrown if the offset is larger than the size of the data

getLong

public long getLong(int offset)
             throws java.lang.IndexOutOfBoundsException
Get the long value at the given position(offset) within the native object.
Parameters:
offset - the given number of bytes to offset
Returns:
the long value at the offset.
Throws:
java.lang.IndexOutOfBoundsException - is thrown if the offset is larger than the size of the data

getFloat

public float getFloat(int offset)
               throws java.lang.IndexOutOfBoundsException
Get the float value at the given position(offset) within the native object.
Parameters:
offset - the given number of bytes to offset
Returns:
the float value at the offset.
Throws:
java.lang.IndexOutOfBoundsException - is thrown if the offset is larger than the size of the data

getDouble

public double getDouble(int offset)
                 throws java.lang.IndexOutOfBoundsException
Get the double value at the given position(offset) within the native object.
Parameters:
offset - the given number of bytes to offset
Returns:
the double value at the offset.
Throws:
java.lang.IndexOutOfBoundsException - is thrown if the offset is larger than the size of the data

getCString

public java.lang.String getCString(int offset)
                            throws UtilException,
                                   java.lang.IndexOutOfBoundsException
Returns the C string found at the offset as a java.lang.String
Parameters:
offset - the given number of bytes to offset
Returns:
java.lang.String representation
Throws:
java.lang.IndexOutOfBoundsException - is thrown if the offset is larger than the size of the data

getPString

public java.lang.String getPString(int offset)
                            throws UtilException,
                                   java.lang.IndexOutOfBoundsException
Returns the Pascal string found at the offset as a java.lang.String
Parameters:
offset - the given number of bytes to offset
Returns:
java.lang.String representation
Throws:
java.lang.IndexOutOfBoundsException - is thrown if the offset is larger than the size of the data

getBytes

public byte[] getBytes(int offset,
                       int length)
                throws java.lang.IndexOutOfBoundsException
Returns the byte values at the given position(offset) within the object's memory area.
Parameters:
offset - the given number of bytes to locate the struct.
length - the given number of bytes of memory. The maximum length that will be copied is (size - offset) bytes. If zero then this will return all of the available bytes from the offset.
Returns:
the byte array
Throws:
java.lang.IndexOutOfBoundsException - is thrown if the offset is larger than the size of the data