Here you can find the source of getUnsignedShort(ByteBuffer buffer)
public static int getUnsignedShort(ByteBuffer buffer)
//package com.java2s; //License from project: Open Source License import java.nio.ByteBuffer; public class Main { public static int getUnsignedShort(ByteBuffer buffer) { return buffer.getShort() & 0xFFFF; }/* w ww. j a va 2 s. c o m*/ }