org.vertx.java.core.buffer.Buffer.appendDouble()方法的使用及代码示例

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

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

Buffer.appendDouble介绍

[英]Appends the specified double to the end of the Buffer. The buffer will expand as necessary to accomodate any bytes written.

Returns a reference to this so multiple operations can be appended together.
[中]将指定的double追加到缓冲区的末尾。缓冲区将根据需要扩展以容纳写入的任何字节。
返回对此的引用,以便可以将多个操作附加在一起。

代码示例

代码示例来源:origin: vert-x/mod-lang-php

public Buffer appendDouble(Env env, Value value) {
 buffer.appendDouble(value.toDouble());
 return this;
}

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

protected void writeBody(Buffer buff) {
 if (body == null) {
  buff.appendByte((byte)0);
 } else {
  buff.appendByte((byte)1);
  buff.appendDouble(body);
 }
}

代码示例来源:origin: vert-x/mod-lang-php

/**
 * Appends the given value to the buffer.
 */
public Buffer append(Env env, Value value) {
 if (value.isLong()) {
  buffer.appendLong(value.toLong());
 }
 else if (value.isDouble()) {
  buffer.appendDouble(value.toDouble());
 }
 else if (value.isNumeric()) {
  buffer.appendInt(value.toInt());
 }
 else if (value.isString()) {
  buffer.appendString(value.toString());
 }
 else if (value.isObject()) {
  buffer.appendBuffer((org.vertx.java.core.buffer.Buffer) value.toJavaObject(env, org.vertx.java.core.buffer.Buffer.class));
 }
 return this;
}

相关文章