Here you can find the source of doubleArrayToIntArray(double[] doubles)
public static int[] doubleArrayToIntArray(double[] doubles)
//package com.java2s; //License from project: LGPL public class Main { public static int[] doubleArrayToIntArray(double[] doubles) { int[] ret = new int[doubles.length * 2]; for (int i = 0; i < doubles.length; i++) { long l = Double.doubleToLongBits(doubles[i]); ret[i] = (int) (l >>> 32); ret[i + 1] = (int) l; }//from w w w .j a v a2 s . c o m return ret; } }