Here you can find the source of toShortArray(List
private static short[] toShortArray(List<String> values)
//package com.java2s; import java.util.List; public class Main { private static short[] toShortArray(List<String> values) { short[] ss = new short[values.size()]; for (int i = 0; i < ss.length; i++) { ss[i] = Short.parseShort(values.get(i)); }/*from w w w .j a v a2 s.c om*/ return ss; } }