|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--quicktime.util.EndianOrder
The endian methods in this class are context sensitive, in that the big-endian methods will only flip if the current platform is little endian and the little-endian methods will only flip if the current platform is big endian.
The names of the methods are provided as a means of documenting the usage of the method itself. To operate as specified they rely upon the application correctly providing the expected endian-ordered number to the method. Thus, the flipNativeToBigEndian and flipBigEndianToNative will both flip when executed on a little-endian architecture but the methods are unable to determine if the argument is actually (in this case) in native little-endian order or big endian order. The application itself must ensure that the provided argument is correct for these methods to return their exepcted result.
Method Summary | |
static void |
flipBigEndianToNative(java.lang.Object src,
int srcOffset,
EndianDescriptor ed)
This will flip, iff the current runtime architecture is little endian, the supplied src object's fields according to the characteristics of the supplied EndianDescriptor. |
static void |
flipBigEndianToNative(java.lang.Object src,
int srcOffset,
java.lang.Object dest,
int destOffset,
EndianDescriptor ed)
This will flip, iff the current runtime architecture is little endian, 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 |
flipBigEndianToNative16(short s)
This will flip the endian order of a 16bit value iff the current runtime architecture is little endian, otherwise the returned value is the same as the supplied value. |
static int |
flipBigEndianToNative32(int i)
This will flip the endian order of a 32bit value iff the current runtime architecture is little endian, otherwise the returned value is the same as the supplied value. |
static long |
flipBigEndianToNative64(long l)
This will flip the endian order of a 64bit value iff the current runtime architecture is little endian, otherwise the returned value is the same as the supplied value. |
static void |
flipLittleEndianToNative(java.lang.Object src,
int srcOffset,
EndianDescriptor ed)
This will flip, iff the current runtime architecture is big endian, the supplied src object's fields according to the characteristics of the supplied EndianDescriptor. |
static void |
flipLittleEndianToNative(java.lang.Object src,
int srcOffset,
java.lang.Object dest,
int destOffset,
EndianDescriptor ed)
This will flip, iff the current runtime architecture is big endian, 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 |
flipLittleEndianToNative16(short s)
This will flip the endian order of a 16bit value iff the current runtime architecture is big endian, otherwise the returned value is the same as the supplied value. |
static int |
flipLittleEndianToNative32(int i)
This will flip the endian order of a 32bit value iff the current runtime architecture is big endian, otherwise the returned value is the same as the supplied value. |
static long |
flipLittleEndianToNative64(long l)
This will flip the endian order of a 64bit value iff the current runtime architecture is big endian, otherwise the returned value is the same as the supplied value. |
static void |
flipNativeToBigEndian(java.lang.Object src,
int srcOffset,
EndianDescriptor ed)
This will flip iff the current runtime architecture is little endian the supplied src object's fields according to the characteristics of the supplied EndianDescriptor. |
static void |
flipNativeToBigEndian(java.lang.Object src,
int srcOffset,
java.lang.Object dest,
int destOffset,
EndianDescriptor ed)
This will flip, iff the current runtime architecture is little endian, 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 |
flipNativeToBigEndian16(short s)
This will flip the endian order of a 16bit value iff the current runtime architecture is little endian, otherwise the returned value is the same as the supplied value. |
static int |
flipNativeToBigEndian32(int i)
This will flip the endian order of a 32bit value iff the current runtime architecture is little endian, otherwise the returned value is the same as the supplied value. |
static long |
flipNativeToBigEndian64(long l)
This will flip the endian order of a 64bit value iff the current runtime architecture is little endian, otherwise the returned value is the same as the supplied value. |
static void |
flipNativeToLittleEndian(java.lang.Object src,
int srcOffset,
EndianDescriptor ed)
This will flip, iff the current runtime architecture is big endian, the supplied src object's fields according to the characteristics of the supplied EndianDescriptor. |
static void |
flipNativeToLittleEndian(java.lang.Object src,
int srcOffset,
java.lang.Object dest,
int destOffset,
EndianDescriptor ed)
This will flip, iff the current runtime architecture is big endian, 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 |
flipNativeToLittleEndian16(short s)
This will flip the endian order of a 16bit value iff the current runtime architecture is big endian, otherwise the returned value is the same as the supplied value. |
static int |
flipNativeToLittleEndian32(int i)
This will flip the endian order of a 32bit value iff the current runtime architecture is big endian, otherwise the returned value is the same as the supplied value. |
static long |
flipNativeToLittleEndian64(long l)
This will flip the endian order of a 64bit value iff the current runtime architecture is big endian, otherwise the returned value is the same as the supplied value. |
static boolean |
isNativeBigEndian()
Returns true if the current runtime architecture is big endian. |
static boolean |
isNativeLittleEndian()
Returns true if the current runtime architecture is little endian. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static boolean isNativeLittleEndian()
public static boolean isNativeBigEndian()
public static short flipNativeToBigEndian16(short s)
s
- the value to flippublic static short flipBigEndianToNative16(short s)
s
- the value to flippublic static short flipNativeToLittleEndian16(short s)
s
- the value to flippublic static short flipLittleEndianToNative16(short s)
s
- the value to flippublic static int flipNativeToBigEndian32(int i)
i
- the value to flippublic static int flipBigEndianToNative32(int i)
i
- the value to flippublic static int flipNativeToLittleEndian32(int i)
i
- the value to flippublic static int flipLittleEndianToNative32(int i)
i
- the value to flippublic static long flipNativeToBigEndian64(long l)
l
- the value to flippublic static long flipBigEndianToNative64(long l)
l
- the value to flippublic static long flipNativeToLittleEndian64(long l)
l
- the value to flippublic static long flipLittleEndianToNative64(long l)
l
- the value to flippublic static void flipNativeToBigEndian(java.lang.Object src, int srcOffset, EndianDescriptor ed) throws UtilException
src
- the object to flip iff the current runtime architecture is little endiansrcOffset
- 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 flipBigEndianToNative(java.lang.Object src, int srcOffset, EndianDescriptor ed) throws UtilException
src
- the object to flip iff the current runtime architecture is little endiansrcOffset
- 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 flipNativeToLittleEndian(java.lang.Object src, int srcOffset, EndianDescriptor ed) throws UtilException
src
- the object to flip iff the current runtime architecture is big endiansrcOffset
- 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.public static void flipLittleEndianToNative(java.lang.Object src, int srcOffset, EndianDescriptor ed) throws UtilException
src
- the object to flip iff the current runtime architecture is big endiansrcOffset
- 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.public static void flipNativeToBigEndian(java.lang.Object src, int srcOffset, java.lang.Object dest, int destOffset, EndianDescriptor ed) throws UtilException
src
- the object to flip iff the current runtime architecture is little endiansrcOffset
- 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.public static void flipBigEndianToNative(java.lang.Object src, int srcOffset, java.lang.Object dest, int destOffset, EndianDescriptor ed) throws UtilException
src
- the object to flip iff the current runtime architecture is little endiansrcOffset
- 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.public static void flipNativeToLittleEndian(java.lang.Object src, int srcOffset, java.lang.Object dest, int destOffset, EndianDescriptor ed) throws UtilException
src
- the object to flip iff the current runtime architecture is big endiansrcOffset
- 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.public static void flipLittleEndianToNative(java.lang.Object src, int srcOffset, java.lang.Object dest, int destOffset, EndianDescriptor ed) throws UtilException
src
- the object to flip iff the current runtime architecture is big endiansrcOffset
- 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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |