Here you can find the source of getUInt8(ByteBuffer b, int n)
public static short[] getUInt8(ByteBuffer b, int n)
//package com.java2s; //License from project: Apache License import java.nio.ByteBuffer; public class Main { public static short[] getUInt8(ByteBuffer b, int n) { short s[] = new short[n]; for (int k = 0; k < s.length; k++) { s[k] = getUInt8(b);/* w w w. j a va 2s .co m*/ } return s; } public static short getUInt8(ByteBuffer b) { return (short) (b.get() & 0xFF); } }