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