* @return 0 if strings are equal,
* <0 if Java string is lexicographically less than the native string,
* >0 if Java string is lexicographically greater than the native string.
*/
public int compareString(String strObj, long str, int len, int byteOrder) {
ByteOrder or = ByteOrder.nativeOrder();
String cmpTo = createString(str, 2 * len);
if ((byteOrder == 1 && or == ByteOrder.BIG_ENDIAN)
|| (byteOrder == 2 && or == ByteOrder.LITTLE_ENDIAN)) {
return strObj.compareTo(cmpTo);
}