Here you can find the source of getUInt16(ByteBuffer b, int n)
public static int[] getUInt16(ByteBuffer b, int n)
//package com.java2s; //License from project: Apache License import java.nio.ByteBuffer; public class Main { public static int[] getUInt16(ByteBuffer b, int n) { int i[] = new int[n]; for (int k = 0; k < i.length; k++) { i[k] = getUInt16(b);// ww w. j av a2 s . c om } return i; } public static int getUInt16(ByteBuffer b) { return (b.getShort() & 0xFFFF); } public static short[] getShort(ByteBuffer b, int n) { short s[] = new short[n]; for (int k = 0; k < s.length; k++) { s[k] = b.getShort(); } return s; } }