io.vertx.core.buffer.Buffer.getDouble()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(3.4k)|赞(0)|评价(0)|浏览(87)

本文整理了Java中io.vertx.core.buffer.Buffer.getDouble()方法的一些代码示例,展示了Buffer.getDouble()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Buffer.getDouble()方法的具体详情如下:
包路径:io.vertx.core.buffer.Buffer
类名称:Buffer
方法名:getDouble

Buffer.getDouble介绍

[英]Returns the double at position pos in the Buffer.
[中]返回缓冲区中的双精度位置。

代码示例

代码示例来源:origin: eclipse-vertx/vert.x

@Override
public Double decodeFromWire(int pos, Buffer buffer) {
 return buffer.getDouble(pos);
}

代码示例来源:origin: eclipse-vertx/vert.x

private void testSetDouble(Buffer buff) throws Exception {
 for (int i = 0; i < numSets; i++) {
  buff.setDouble(i * 8, (double) i);
 }
 for (int i = 0; i < numSets; i++) {
  assertEquals((double) i, buff.getDouble(i * 8), 0);
 }
}

代码示例来源:origin: eclipse-vertx/vert.x

@Test
public void testGetDouble() throws Exception {
 int numDoubles = 100;
 Buffer b = Buffer.buffer(numDoubles * 8);
 for (int i = 0; i < numDoubles; i++) {
  b.setDouble(i * 8, i);
 }
 for (int i = 0; i < numDoubles; i++) {
  assertEquals((double) i, b.getDouble(i * 8), 0);
 }
}

代码示例来源:origin: io.vertx/vertx-core

@Override
public Double decodeFromWire(int pos, Buffer buffer) {
 return buffer.getDouble(pos);
}

代码示例来源:origin: eclipse-vertx/vert.x

assertIndexOutOfBoundsException(() -> b.getFloat(-1));
assertIndexOutOfBoundsException(() -> b.getFloat(-100));
assertIndexOutOfBoundsException(() -> b.getDouble(bytesLen));
assertIndexOutOfBoundsException(() -> b.getDouble(bytesLen + 1));
assertIndexOutOfBoundsException(() -> b.getDouble(bytesLen + 100));
assertIndexOutOfBoundsException(() -> b.getDouble(-1));
assertIndexOutOfBoundsException(() -> b.getDouble(-100));
assertIndexOutOfBoundsException(() -> b.getShort(bytesLen));
assertIndexOutOfBoundsException(() -> b.getShort(bytesLen + 1));

代码示例来源:origin: io.vertx/vertx-core

private void testSetDouble(Buffer buff) throws Exception {
 for (int i = 0; i < numSets; i++) {
  buff.setDouble(i * 8, (double) i);
 }
 for (int i = 0; i < numSets; i++) {
  assertEquals((double) i, buff.getDouble(i * 8), 0);
 }
}

代码示例来源:origin: io.vertx/vertx-core

@Test
public void testGetDouble() throws Exception {
 int numDoubles = 100;
 Buffer b = Buffer.buffer(numDoubles * 8);
 for (int i = 0; i < numDoubles; i++) {
  b.setDouble(i * 8, i);
 }
 for (int i = 0; i < numDoubles; i++) {
  assertEquals((double) i, b.getDouble(i * 8), 0);
 }
}

代码示例来源:origin: vert-x3/vertx-web

break;
case TYPE_DOUBLE:
 val = buffer.getDouble(pos);
 pos += 8;
 break;

代码示例来源:origin: io.vertx/vertx-rx-java

/**
 * Returns the <code>double</code> at position <code>pos</code> in the Buffer.
 * @param pos 
 * @return 
 */
public double getDouble(int pos) { 
 double ret = delegate.getDouble(pos);
 return ret;
}

代码示例来源:origin: vert-x3/vertx-rx

/**
 * Returns the <code>double</code> at position <code>pos</code> in the Buffer.
 * @param pos 
 * @return 
 */
public double getDouble(int pos) { 
 double ret = delegate.getDouble(pos);
 return ret;
}

代码示例来源:origin: io.vertx/vertx-core

assertIndexOutOfBoundsException(() -> b.getFloat(-1));
assertIndexOutOfBoundsException(() -> b.getFloat(-100));
assertIndexOutOfBoundsException(() -> b.getDouble(bytesLen));
assertIndexOutOfBoundsException(() -> b.getDouble(bytesLen + 1));
assertIndexOutOfBoundsException(() -> b.getDouble(bytesLen + 100));
assertIndexOutOfBoundsException(() -> b.getDouble(-1));
assertIndexOutOfBoundsException(() -> b.getDouble(-100));
assertIndexOutOfBoundsException(() -> b.getShort(bytesLen));
assertIndexOutOfBoundsException(() -> b.getShort(bytesLen + 1));

代码示例来源:origin: com.jukusoft/vertx-binary-serializer

double d = msg.getDouble(_pos);
_pos += 8;

代码示例来源:origin: io.vertx/vertx-web

break;
case TYPE_DOUBLE:
 val = buffer.getDouble(pos);
 pos += 8;
 break;

相关文章

微信公众号

最新文章

更多