io.netty.buffer.ByteBuf.readBoolean()方法的使用及代码示例

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

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

ByteBuf.readBoolean介绍

[英]Gets a boolean at the current readerIndex and increases the readerIndex by 1 in this buffer.
[中]获取当前readerIndex处的布尔值,并在此缓冲区中将readerIndex增加1。

代码示例

代码示例来源:origin: netty/netty

@Override
public boolean readBoolean() {
  return buf.readBoolean();
}

代码示例来源:origin: netty/netty

@Override
public boolean readBoolean() {
  return buf.readBoolean();
}

代码示例来源:origin: redisson/redisson

@Override
public boolean readBoolean() {
  return buf.readBoolean();
}

代码示例来源:origin: redisson/redisson

@Override
public boolean readBoolean() {
  return buf.readBoolean();
}

代码示例来源:origin: wildfly/wildfly

@Override
public boolean readBoolean() {
  return buf.readBoolean();
}

代码示例来源:origin: wildfly/wildfly

@Override
public boolean readBoolean() {
  return buf.readBoolean();
}

代码示例来源:origin: micronaut-projects/micronaut-core

@Override
public boolean readBoolean() {
  return byteBuf.readBoolean();
}

代码示例来源:origin: netty/netty

@Override
public boolean readBoolean() {
  checkReadableBytes(1);
  return buffer.readBoolean();
}

代码示例来源:origin: redisson/redisson

@Override
public boolean readBoolean() {
  checkReadableBytes(1);
  return buffer.readBoolean();
}

代码示例来源:origin: wildfly/wildfly

@Override
public boolean readBoolean() {
  checkReadableBytes(1);
  return buffer.readBoolean();
}

代码示例来源:origin: GlowstoneMC/Glowstone

@Override
public PlayerUpdateMessage decode(ByteBuf buffer) throws IOException {
  boolean onGround = buffer.readBoolean();
  return new PlayerUpdateMessage(onGround);
}

代码示例来源:origin: GlowstoneMC/Glowstone

@Override
public JoinGameMessage decode(ByteBuf buffer) throws IOException {
  int id = buffer.readInt();
  byte gameMode = buffer.readByte();
  int dimension = buffer.readInt();
  byte difficulty = buffer.readByte();
  byte maxPlayers = buffer.readByte();
  String levelType = ByteBufUtils.readUTF8(buffer);
  boolean reducedDebug = buffer.readBoolean();
  return new JoinGameMessage(id, gameMode, dimension, difficulty, maxPlayers, levelType,
    reducedDebug);
}

代码示例来源:origin: alibaba/Sentinel

@Override
  public FlowRequestData decode(ByteBuf source) {
    if (source.readableBytes() >= 12) {
      FlowRequestData requestData = new FlowRequestData()
        .setFlowId(source.readLong())
        .setCount(source.readInt());
      if (source.readableBytes() >= 1) {
        requestData.setPriority(source.readBoolean());
      }
      return requestData;
    }
    return null;
  }
}

代码示例来源:origin: GlowstoneMC/Glowstone

@Override
public CraftRecipeRequestMessage decode(ByteBuf buf) throws IOException {
  int windowId = buf.readByte();
  int recipeId = ByteBufUtils.readVarInt(buf);
  boolean makeAll = buf.readBoolean();
  return new CraftRecipeRequestMessage(windowId, recipeId, makeAll);
}

代码示例来源:origin: GlowstoneMC/Glowstone

@Override
public RelativeEntityPositionRotationMessage decode(ByteBuf buf) throws IOException {
  int id = ByteBufUtils.readVarInt(buf);
  short x = buf.readShort();
  short y = buf.readShort();
  short z = buf.readShort();
  int rotation = buf.readByte();
  int pitch = buf.readByte();
  boolean ground = buf.readBoolean();
  return new RelativeEntityPositionRotationMessage(id, x, y, z, rotation, pitch, ground);
}

代码示例来源:origin: GlowstoneMC/Glowstone

@Override
public EntityTeleportMessage decode(ByteBuf buf) throws IOException {
  int id = ByteBufUtils.readVarInt(buf);
  double x = buf.readDouble();
  double y = buf.readDouble();
  double z = buf.readDouble();
  int rotation = buf.readByte();
  int pitch = buf.readByte();
  boolean ground = buf.readBoolean();
  return new EntityTeleportMessage(id, x, y, z, rotation, pitch, ground);
}

代码示例来源:origin: GlowstoneMC/Glowstone

@Override
public PlayerLookMessage decode(ByteBuf buffer) throws IOException {
  float yaw = buffer.readFloat();
  float pitch = buffer.readFloat();
  boolean onGround = buffer.readBoolean();
  return new PlayerLookMessage(yaw, pitch, onGround);
}

代码示例来源:origin: GlowstoneMC/Glowstone

@Override
public ClientSettingsMessage decode(ByteBuf buf) throws IOException {
  String locale = ByteBufUtils.readUTF8(buf);
  int viewDistance = buf.readByte();
  int chatFlags = ByteBufUtils.readVarInt(buf);
  boolean colors = buf.readBoolean();
  int skinFlags = buf.readUnsignedByte();
  int hand = ByteBufUtils.readVarInt(buf);
  return new ClientSettingsMessage(locale, viewDistance, chatFlags, colors, skinFlags, hand);
}

代码示例来源:origin: GlowstoneMC/Glowstone

@Override
public RelativeEntityPositionMessage decode(ByteBuf buf) throws IOException {
  int id = ByteBufUtils.readVarInt(buf);
  short deltaX = buf.readShort();
  short deltaY = buf.readShort();
  short deltaZ = buf.readShort();
  boolean onGround = buf.readBoolean();
  return new RelativeEntityPositionMessage(id, deltaX, deltaY, deltaZ, onGround);
}

代码示例来源:origin: GlowstoneMC/Glowstone

@Override
public PlayerPositionLookMessage decode(ByteBuf buffer) throws IOException {
  double x = buffer.readDouble();
  double y = buffer.readDouble();
  double z = buffer.readDouble();
  float yaw = buffer.readFloat();
  float pitch = buffer.readFloat();
  boolean onGround = buffer.readBoolean();
  return new PlayerPositionLookMessage(onGround, x, y, z, yaw, pitch);
}

相关文章

ByteBuf类方法