import java.nio.*; import java.nio.ByteBuffer; public class GetDoubleValue { public static final int capacity = 100; public static void main(String[] argv) throws Exception { ByteBuffer bytebuf = ByteBuffer.allocateDirect(capacity); bytebuf.putDouble(5822.0876); bytebuf.flip(); System.out.println("Double data into byte buffer : " + bytebuf.getDouble()); } }