public static LongBuffer Wrap(long[] data) { LongBuffer buf = new LongBuffer(new byte[data.Length * 8], 0, data.Length * 8); for (int i = 0; i < data.Length; i++) { buf.PutLong(data[i]); } return buf; }