Here you can find the source of getUnsignedShort(ByteBuffer bb)
public static int getUnsignedShort(ByteBuffer bb)
//package com.java2s; //License from project: LGPL import java.nio.ByteBuffer; public class Main { public static int getUnsignedShort(ByteBuffer bb) { return (bb.getShort() & 0xffff); }/*from www . j a va 2 s.c om*/ public static int getUnsignedShort(ByteBuffer bb, int position) { return (bb.getShort(position) & 0xffff); } }