Java examples for java.nio:DoubleBuffer
new Double Buffer
//package com.java2s; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.nio.DoubleBuffer; public class Main { public static void main(String[] argv) throws Exception { int paramInt = 2; System.out.println(newDoubleBuffer(paramInt)); }//from ww w. ja v a 2 s. c o m public static DoubleBuffer newDoubleBuffer(int paramInt) { ByteBuffer localByteBuffer = newByteBuffer(paramInt * 8); return localByteBuffer.asDoubleBuffer(); } public static ByteBuffer newByteBuffer(int paramInt) { ByteBuffer localByteBuffer = ByteBuffer.allocateDirect(paramInt); localByteBuffer.order(ByteOrder.nativeOrder()); return localByteBuffer; } }