|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--quicktime.util.QTUtils
This provides a set of routines to convert between types that the QT calls expect and the basic Java classes and types
Some of the structures in QT are kept in their native BigEndian format.
Fields inherited from interface quicktime.jdirect.QuickTimeLib |
JDirect_MacOSX, libraryInstance, name |
Method Summary | |
static void |
checkFreeMemory()
This call will ensure that a reserved amount of application heap memory on the MacOS is free. |
static int |
convertEventModifier(int javaEvtMod)
Convert the modifier values in java InputEvents to those expected by QT. |
static int |
convertKeyValue(int javaKeyValue)
Convert the key values in java KeyEvents to those expected by QT. |
static java.lang.String |
CString2String(byte[] str,
int offset)
Converts a CString into a java.lang.String. |
static void |
endianFlip(java.lang.Object src,
int srcOffset,
EndianDescriptor ed)
This will flip the supplied src object's fields according to the characteristics of the supplied EndianDescriptor. |
static void |
endianFlip(java.lang.Object src,
int srcOffset,
java.lang.Object dest,
int destOffset,
EndianDescriptor ed)
This will flip the supplied src object's fields according to the characteristics of the supplied EndianDescriptor and copy these flipped values to the destination object. |
static short |
endianFlip16(short s)
This will flip the endian order of a 16bit value |
static int |
endianFlip32(int i)
This will flip the endian order of a 32bit value |
static long |
endianFlip64(long l)
This will flip the endian order of a 64bit value |
static float |
Fix2X(int fix)
Convert a float to a 16.16 Fixed format |
static float |
Fract2X(int fract)
Convert a 2.30 Fract format to a float |
static java.lang.String |
fromOSType(int osType)
Converts an int into a 4 character string representing an OSType. |
static java.lang.String |
PString2String(byte[] pString,
int offset)
Converts a PString into a java.lang.String. |
static void |
reclaimMemory()
Reclaim as much memory as possible and ensure that all finalize methods are called on objects which have been collected. |
static float |
ShortFix2X(short fix)
Convert a 8.8 Fixed format to a float |
static byte[] |
String2CString(java.lang.String str)
Convert a java.lang.String to a CString byte array. |
static byte[] |
String2PString(java.lang.String str,
int len)
Convert a java.lang.String to a PString byte array. |
static int |
toOSType(char a,
char b,
char c,
char d)
Converts four characters into an OSType int |
static int |
toOSType(java.lang.String str)
Converts an OSType (4 character) string into an int. |
static int |
UByte2Int(byte b)
converts an unsigned byte to int. |
static float |
UFix2X(int fix)
Convert a 16.16 Unsigned Fixed format to a float |
static long |
UInt2Long(int i)
converts an unsigned int to long. |
static int |
UShort2Int(short s)
converts an unsigned short to int. |
static int |
X2Fix(float x)
Convert a float to a 16.16 Fixed format |
static int |
X2Fract(float x)
Converts a float to a 2.30 Fract format |
static short |
X2ShortFix(float x)
Convert a float to a 8.8 Fixed format |
static int |
X2UFix(float x)
Convert a 16.16 Unsigned Fixed format to a float |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static int convertEventModifier(int javaEvtMod)
public static int convertKeyValue(int javaKeyValue)
public static int X2Fix(float x)
public static float Fix2X(int fix)
public static int X2UFix(float x)
public static float UFix2X(int fix)
public static int X2Fract(float x)
public static float Fract2X(int fract)
public static short X2ShortFix(float x)
public static float ShortFix2X(short fix)
public static int UByte2Int(byte b)
public static int UShort2Int(short s)
public static long UInt2Long(int i)
public static byte[] String2CString(java.lang.String str)
str
- the String to convertpublic static byte[] String2PString(java.lang.String str, int len)
str
- the String to convertlen
- the maximum length of the Pstring, max length is 255.public static java.lang.String CString2String(byte[] str, int offset)
public static java.lang.String PString2String(byte[] pString, int offset)
public static final int toOSType(java.lang.String str)
public static final int toOSType(char a, char b, char c, char d)
public static java.lang.String fromOSType(int osType)
public static void reclaimMemory()
public static void checkFreeMemory() throws UtilException
public static short endianFlip16(short s)
s
- the value to flipEndianOrder
public static int endianFlip32(int i)
i
- the value to flipEndianOrder
public static long endianFlip64(long l)
l
- the value to flipEndianOrder
public static void endianFlip(java.lang.Object src, int srcOffset, EndianDescriptor ed) throws UtilException
src
- the object to flipsrcOffset
- the number of bytes from the start of the src object that the supplied endian descriptor
will be applied.ed
- the EndianDescriptor that will describe how the object should be flipped. This may NOT be null.EndianOrder
public static void endianFlip(java.lang.Object src, int srcOffset, java.lang.Object dest, int destOffset, EndianDescriptor ed) throws UtilException
src
- the object to flipsrcOffset
- the number of bytes from the start of the src object that the supplied endian descriptor
will be applied.dest
- the object that will be the flipped version of the source object.destOffset
- the number of bytes from the start of the dest object that the flipped values will be copied too.ed
- the EndianDescriptor that will describe how the object should be flipped. This may NOT be null.EndianOrder
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |