Here you can find the source of allocateDoubles(final int howmany, final int SIZE)
public static DoubleBuffer allocateDoubles(final int howmany, final int SIZE)
//package com.java2s; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.nio.DoubleBuffer; public class Main { public static DoubleBuffer allocateDoubles(final int howmany, final int SIZE) { return ByteBuffer.allocateDirect(howmany * SIZE).order(ByteOrder.nativeOrder()).asDoubleBuffer(); }//w w w . j ava 2 s . co m }