Ejemplo n.º 1
0
 @Override
 public void readData(DataInputStream input) throws IOException {
   super.readData(input);
   this.setText(PacketUtil.readString(input));
   this.setCentered(input.readBoolean());
   this.setHexColor(input.readInt());
 }
Ejemplo n.º 2
0
 @Override
 public void writeData(DataOutputStream output) throws IOException {
   super.writeData(output);
   PacketUtil.writeString(output, getText());
   output.writeBoolean(isCentered());
   output.writeInt(getHexColor());
 }
Ejemplo n.º 3
0
 @Override
 public int getNumBytes() {
   return super.getNumBytes() + PacketUtil.getNumBytes(getText()) + 5;
 }