Package io.netty.buffer

Examples of io.netty.buffer.ByteBuf.array()


        // let visitSchemaPath() handle this.
        return e.getInput().accept(this, valueArg);
      }

      if (bb != null) {
        this.value = bb.array();
        this.path = (SchemaPath)e.getInput();
        return true;
      }
    }
    return false;
View Full Code Here


        try {
            ByteBufUtils.writeUTF8(buf, text);
        } catch (IOException e) {
            GlowServer.logger.log(Level.WARNING, "Error converting to PluginMessage: \"" + channel + "\", \"" + text + "\"", e);
        }
        return new PluginMessage(channel, buf.array());
    }

}
View Full Code Here

      while (!saslClient.isComplete()) {
        SaslMessage msg = new SaslMessage(appId, payload);
        ByteBuf buf = Unpooled.buffer(msg.encodedLength());
        msg.encode(buf);

        byte[] response = client.sendRpcSync(buf.array(), conf.saslRTTimeout());
        payload = saslClient.response(response);
      }
    } finally {
      try {
        // Once authentication is complete, the server will trust all remaining communication.
View Full Code Here

  public byte[] toByteArray() {
    ByteBuf buf = Unpooled.buffer(encodedLength());
    buf.writeByte(type().id);
    encode(buf);
    assert buf.writableBytes() == 0 : "Writable bytes remain: " + buf.writableBytes();
    return buf.array();
  }
}
View Full Code Here

    byte[] skillsUnlocked = character.getSkillsAvailable();

    characterData.setAttPtsFree(attrPtsFree);
    characterData.setAttPtsTotal(attrPtsTotal);

    characterData.setAppearance(appearance.array());

    characterData.setPosition(new GWVector(chosenSpwwnPoint.getX(), chosenSpwwnPoint.getY(), chosenSpwwnPoint.getZ()));
    characterData.setDirection(new GWVector(0, 0, 0));
    characterData.setMoveState(MovementState.NOT_MOVING);
    characterData.setRotation(0xBF4FC0B6);
View Full Code Here

            ByteBuf buf = Unpooled.buffer(16 * listening.size());
            for (String channel : listening) {
                buf.writeBytes(channel.getBytes(StandardCharsets.UTF_8));
                buf.writeByte(0);
            }
            session.send(new PluginMessage("REGISTER", buf.array()));
        }
    }
}
View Full Code Here

      boolean gateValid = gate != null;
      data.writeBoolean(gateValid);
      if (gateValid) {
        ByteBuf buffer = Unpooled.buffer();
        gate.writeToByteBuf(buffer);
        data.writeByteArray(buffer.array());
      }
    }
  }

  @Override
View Full Code Here

    wireMatrix.writeData(buf);
    facadeMatrix.writeData(buf);
    robotStationMatrix.writeData(buf);
    gateMatrix.writeData(buf);
   
    data.writeByteArray(buf.array());
  }

  @Override
  public void readData(LPDataInputStream data) throws IOException {
    gateIconIndex = data.readInt();
View Full Code Here

    try
    {
      cb.writeToStream( stream );
      packet.writeInt( stream.readableBytes() );
      stream.capacity( stream.readableBytes() );
      packet.writeByteArray( stream.array() );
    }
    catch (IOException e)
    {
      AELog.error( e );
    }
View Full Code Here

  public void writeToNBT_TilePaint(NBTTagCompound data)
  {
    ByteBuf myDat = Unpooled.buffer();
    writeBuffer( myDat );
    if ( myDat.hasArray() )
      data.setByteArray( "dots", myDat.array() );
  }

  @TileEvent(TileEventType.WORLD_NBT_READ)
  public void readFromNBT_TilePaint(NBTTagCompound data)
  {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.