Here you can find the source of toShortArray(final List
public static final short[] toShortArray(final List<Short> pItems)
//package com.java2s; import java.util.List; public class Main { public static final short[] toShortArray(final List<Short> pItems) { final short[] out = new short[pItems.size()]; for (int i = out.length - 1; i >= 0; i--) { out[i] = pItems.get(i);//from ww w . jav a 2s . c o m } return out; } }