Here you can find the source of byteArrayToShortArrayList(byte[] byteArray)
public static ArrayList<Short> byteArrayToShortArrayList(byte[] byteArray)
//package com.java2s; //License from project: Creative Commons License import java.util.ArrayList; public class Main { public static ArrayList<Short> byteArrayToShortArrayList(byte[] byteArray) { ArrayList<Short> temp = new ArrayList<Short>(); for (int i = 0; i < byteArray.length; i = i + 1000) { temp.add((short) byteArray[i]); }// ww w. j ava 2 s . co m return temp; } }