Java Utililty Methods ByteBuffer Compare

List of utility methods to do ByteBuffer Compare

Description

The list of methods to do ByteBuffer Compare are organized into topic(s).

Method

intcompareSubArrays(ByteBuffer bytes1, int offset1, ByteBuffer bytes2, int offset2, int length)
Compare two ByteBuffer at specified offsets for length.
if (null == bytes1) {
    if (null == bytes2)
        return 0;
    else
        return -1;
if (null == bytes2)
    return 1;
...
intcompareToP(ByteBuffer bb1, ByteBuffer bb2)
compare To P
final int offset1 = bb1.position();
final int offset2 = bb2.position();
final byte[] array1 = bb1.array();
final byte[] array2 = bb2.array();
final int len1 = bb1.remaining();
final int len2 = bb2.remaining();
return compareTo(array1, offset1, len1, array2, offset2, len2);
intcompareUnsigned(ByteBuffer o1, ByteBuffer o2)
compare Unsigned
return compareUnsigned(o1.array(), o2.array(), o1.arrayOffset() + o1.position(),
        o2.arrayOffset() + o2.position(), o1.limit() + o1.arrayOffset(), o2.limit() + o2.arrayOffset());