private static int compareAsNumeric(byte type1, byte[] b1, int o1, byte type2, byte[] b2, int o2) { switch (type1 << 8 | type2) { case BYTE_TO_BYTE: return compareAsShort (getByte (b1, o1), getByte (b2, o2)); case BYTE_TO_SHORT: return compareAsShort (getByte (b1, o1), getShort (b2, o2)); case BYTE_TO_INT: return compareAsInt (getByte (b1, o1), getInt (b2, o2)); case BYTE_TO_LONG: return compareAsLong (getByte (b1, o1), getLong (b2, o2)); case BYTE_TO_DOUBLE: return compareAsDouble(getByte (b1, o1), getDouble(b2, o2)); case SHORT_TO_BYTE: return compareAsShort (getShort (b1, o1), getByte (b2, o2)); case SHORT_TO_SHORT: return compareAsShort (getShort (b1, o1), getShort (b2, o2)); case SHORT_TO_INT: return compareAsInt (getShort (b1, o1), getInt (b2, o2)); case SHORT_TO_LONG: return compareAsLong (getShort (b1, o1), getLong (b2, o2));