Here you can find the source of doubleToLong(double[] values)
public static long[] doubleToLong(double[] values)
//package com.java2s; public class Main { public static long[] doubleToLong(double[] values) { if (values == null) { return null; }//w w w . j a va2s. co m long[] results = new long[values.length]; for (int i = 0; i < values.length; i++) { results[i] = (long) values[i]; } return results; } }