Here you can find the source of getShort(ByteBuffer b, int n)
public static short[] getShort(ByteBuffer b, int n)
//package com.java2s; //License from project: Apache License import java.nio.ByteBuffer; public class Main { 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();/*from w w w . jav a 2 s . co m*/ } return s; } }