Android ByteBuffer Put getUnsignedShort(final ByteBuffer pByteBuffer, final int pPosition)

Here you can find the source of getUnsignedShort(final ByteBuffer pByteBuffer, final int pPosition)

Description

get Unsigned Short

Declaration

public static int getUnsignedShort(final ByteBuffer pByteBuffer,
            final int pPosition) 

Method Source Code

//package com.java2s;
import java.nio.ByteBuffer;

public class Main {
    public static int getUnsignedShort(final ByteBuffer pByteBuffer) {
        return pByteBuffer.getShort() & 0xFFFF;
    }/*from  ww  w. j  av a2 s  . c o  m*/

    public static int getUnsignedShort(final ByteBuffer pByteBuffer,
            final int pPosition) {
        return pByteBuffer.getShort(pPosition) & 0xFFFF;
    }
}

Related

  1. getUnsignedShort(final ByteBuffer pByteBuffer)
  2. putUnsignedInt(final ByteBuffer pByteBuffer, final int pPosition, final long pValue)
  3. putUnsignedInt(final ByteBuffer pByteBuffer, final long pValue)
  4. putUnsignedShort(final ByteBuffer pByteBuffer, final int pPosition, final int pValue)
  5. putUnsignedShort(final ByteBuffer pByteBuffer, final int pValue)