Java Array to ArrayList byteArrayToShortArrayList(byte[] byteArray)

Here you can find the source of byteArrayToShortArrayList(byte[] byteArray)

Description

byte Array To Short Array List

License

Creative Commons License

Declaration

public static ArrayList<Short> byteArrayToShortArrayList(byte[] byteArray) 

Method Source Code

//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;
    }
}

Related

  1. asArrayList(Collection c)
  2. asArrayList(T... elements)
  3. asArrayList(T[] tArray)
  4. asArrayList(T[] values)
  5. byteArrayToArrayList(byte[] byteArray)
  6. toArrayList( Iterable iterable)
  7. toArrayList(Collection collection)
  8. toArrayList(Collection from)
  9. toArrayList(double[] dd)