Here you can find the source of getUShort(java.nio.ByteBuffer buffer)
public static int getUShort(java.nio.ByteBuffer buffer)
//package com.java2s; public class Main { public static int getUShort(java.nio.ByteBuffer buffer) { return 0xFFFF & buffer.getShort(); }//from w w w. j a va 2 s . com }