Android Utililty Methods ByteBuffer Put

List of utility methods to do ByteBuffer Put

Description

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

Method

intgetUnsignedShort(final ByteBuffer pByteBuffer)
get Unsigned Short
return pByteBuffer.getShort() & 0xFFFF;
intgetUnsignedShort(final ByteBuffer pByteBuffer, final int pPosition)
get Unsigned Short
return pByteBuffer.getShort(pPosition) & 0xFFFF;
voidputUnsignedInt(final ByteBuffer pByteBuffer, final int pPosition, final long pValue)
put Unsigned Int
pByteBuffer.putInt(pPosition, (short) (pValue & 0xFFFFFFFFL));
voidputUnsignedInt(final ByteBuffer pByteBuffer, final long pValue)
put Unsigned Int
pByteBuffer.putInt((int) (pValue & 0xFFFFFFFFL));
voidputUnsignedShort(final ByteBuffer pByteBuffer, final int pPosition, final int pValue)
put Unsigned Short
pByteBuffer.putShort(pPosition, (short) (pValue & 0xFFFF));
voidputUnsignedShort(final ByteBuffer pByteBuffer, final int pValue)
put Unsigned Short
pByteBuffer.putShort((short) (pValue & 0xFFFF));
intfindCommonPrefix(ByteBuffer buffer, int offsetLeft, int offsetRight, int limit)
Find length of common prefix of two parts in the buffer
int prefix = 0;
for (; prefix < limit; ++prefix) {
    if (buffer.get(offsetLeft + prefix) != buffer.get(offsetRight
            + prefix)) {
        break;
return prefix;
...