Java DoubleBuffer convert to double array
import java.nio.DoubleBuffer; import java.util.Arrays; public class Main { public static void main(String[] argv) throws Exception { double[] doubleArray = new double[] { 1.1, 2.2, 3.3, 4.4, 5.5, }; DoubleBuffer bb = DoubleBuffer.wrap(doubleArray); doubleArray = toArray(bb);// ww w . j a v a 2s . c o m System.out.println(Arrays.toString(doubleArray)); } public static double[] toArray(final DoubleBuffer buffer) { double[] array = new double[buffer.limit()]; buffer.get(array); return array; } }