com.couchbase.client.deps.io.netty.buffer.ByteBuf.writeZero()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(1.4k)|赞(0)|评价(0)|浏览(152)

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

ByteBuf.writeZero介绍

[英]Fills this buffer with NUL (0x00) starting at the current writerIndex and increases the writerIndex by the specified length.
[中]使用从当前writerIndex开始的NUL(0x00)填充此缓冲区,并将writerIndex增加指定的长度。

代码示例

代码示例来源:origin: com.couchbase.client/core-io

@Override
public ByteBuf writeZero(int length) {
  buf.writeZero(length);
  return this;
}

代码示例来源:origin: com.couchbase.client/core-io

@Override
public ByteBuf writeZero(int length) {
  buf.writeZero(length);
  return this;
}

代码示例来源:origin: couchbase/couchbase-jvm-core

@Override
public ByteBuf writeZero(int length) {
  buf.writeZero(length);
  return this;
}

代码示例来源:origin: couchbase/couchbase-jvm-core

@Override
public ByteBuf writeZero(int length) {
  buf.writeZero(length);
  return this;
}

代码示例来源:origin: couchbase/java-dcp-client

/**
 * Helper method to initialize a response with an opcode.
 */
public static void initResponse(byte opcode, ByteBuf buffer) {
  buffer.writeByte(MessageUtil.MAGIC_RES);
  buffer.writeByte(opcode);
  buffer.writeZero(HEADER_SIZE - 2);
}

代码示例来源:origin: couchbase/java-dcp-client

/**
 * Helper method to initialize a request with an opcode.
 */
public static void initRequest(byte opcode, ByteBuf buffer) {
  buffer.writeByte(MessageUtil.MAGIC_REQ);
  buffer.writeByte(opcode);
  buffer.writeZero(HEADER_SIZE - 2);
}

相关文章