Here you can find the source of intToShort(int[] values)
public static short[] intToShort(int[] values)
//package com.java2s; public class Main { public static short[] intToShort(int[] values) { if (values == null) { return null; }/* ww w .j ava 2 s . c o m*/ short[] results = new short[values.length]; for (int i = 0; i < values.length; i++) { results[i] = (short) values[i]; } return results; } }