Java tutorial
//package com.java2s; //License from project: Open Source License import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.nio.LongBuffer; public class Main { public static LongBuffer newLongBuffer(int numLongs) { ByteBuffer buffer = ByteBuffer.allocate(numLongs * 8); buffer.order(ByteOrder.nativeOrder()); return buffer.asLongBuffer(); } }