List of usage examples for io.netty.buffer ByteBuf getDouble
public abstract double getDouble(int index);
From source file:io.reactiverse.pgclient.impl.codec.DataTypeCodec.java
License:Apache License
private static Double binaryDecodeFLOAT8(int index, int len, ByteBuf buff) { return buff.getDouble(index); }
From source file:org.nd4j.linalg.api.buffer.DoubleDataBufferTest.java
License:Apache License
@Test public void testNettyCopy() { DataBuffer db = Nd4j.createBuffer(new double[] { 1, 2, 3, 4 }); ByteBuf buf = db.asNetty();// ww w . j av a 2s.co m if (db.allocationMode() == DataBuffer.AllocationMode.HEAP) return; ByteBuf copy = buf.copy(0, buf.capacity()); for (int i = 0; i < db.length(); i++) { assertEquals(db.getDouble(i), copy.getDouble(i * 8)); } }