quicktime.util
Class EndianFlipSpec

java.lang.Object
  |
  +--quicktime.util.EndianFlipSpec

public class EndianFlipSpec
extends java.lang.Object

This class is used to describe the fields of a data-structure that should have its endian order flipped. The class is used to describe a particular part of a data-structure that should be flipped around a consistent size, eg. flip 3 16bit values from 2bytes into object n.

The class is used when an EndianDescriptor is created that describe the endian flipping requirements of a particular data-structure. An EndianDescriptor can be built that contains a collection of EndianFlipSpec objects that completely describe the endian flipping characteristics of the data. An EndianFlipSpec is an individual specification for contiguous fields that have the same flipping characteristics.

A

See Also:
EndianDescriptor

Field Summary
static int kFlip16BitValue
          These constants are used as a format flag to describe the size of the value that the spec will flip around.
static int kFlip32BitValue
          These constants are used as a format flag to describe the size of the value that the spec will flip around.
static int kFlip64BitValue
          These constants are used as a format flag to describe the size of the value that the spec will flip around.
 
Constructor Summary
EndianFlipSpec(int offset, int sizeFlag, int num)
          Creates an EndianFlipSpec with the given offset from the start of the object it describes, the size of the flipping and the number of the specified flippingSize objects that should be flipped.
 
Method Summary
 boolean equals(java.lang.Object o)
          Returns true if the supplied object has the same values as this object.
 int getNumberOfFlips()
          The number of size flag values that should be flipped from the given offset.
 int getOffset()
          The offset from the start of the object where this particular flip specification should be applied.
 int getSizeFlag()
          The size of the endian flipping that should be applied, ie.
 java.lang.String toString()
          Return a string representation of this object.
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

kFlip16BitValue

public static final int kFlip16BitValue
These constants are used as a format flag to describe the size of the value that the spec will flip around.

kFlip32BitValue

public static final int kFlip32BitValue
These constants are used as a format flag to describe the size of the value that the spec will flip around.

kFlip64BitValue

public static final int kFlip64BitValue
These constants are used as a format flag to describe the size of the value that the spec will flip around.
Constructor Detail

EndianFlipSpec

public EndianFlipSpec(int offset,
                      int sizeFlag,
                      int num)
Creates an EndianFlipSpec with the given offset from the start of the object it describes, the size of the flipping and the number of the specified flippingSize objects that should be flipped.
Parameters:
offset - the offset from the start of the object to be flipped
sizeFlag - the size of the flipping that should be applied
num - the number of sizeFlag flips that should be applied.
Method Detail

getOffset

public int getOffset()
The offset from the start of the object where this particular flip specification should be applied.
Returns:
an int

getSizeFlag

public int getSizeFlag()
The size of the endian flipping that should be applied, ie. flipping around 16, 32 or 64 bit values.
Returns:
an int

getNumberOfFlips

public int getNumberOfFlips()
The number of size flag values that should be flipped from the given offset.
Returns:
an int

equals

public boolean equals(java.lang.Object o)
Returns true if the supplied object has the same values as this object.
Overrides:
equals in class java.lang.Object
Returns:
a boolean

toString

public java.lang.String toString()
Return a string representation of this object.
Overrides:
toString in class java.lang.Object
Returns:
a String