Example #1
0
 public void writeData(DataOutputStream output) throws IOException {
   output.writeInt(id);
   output.writeShort(data);
   PacketUtil.writeString(output, name);
 }
Example #2
0
 public void readData(DataInputStream input) throws IOException {
   id = input.readInt();
   data = input.readShort();
   name = PacketUtil.readString(input);
 }
Example #3
0
 public int getNumBytes() {
   return 6 + PacketUtil.getNumBytes(name);
 }
 @Override
 public void writeData(DataOutputStream output) throws IOException {
   super.writeData(output);
   PacketUtil.writeString(output, getUrl());
   output.writeBoolean(isDrawingAlphaChannel());
 }
 @Override
 public void readData(DataInputStream input) throws IOException {
   super.readData(input);
   this.setUrl(PacketUtil.readString(input));
   this.setDrawAlphaChannel(input.readBoolean());
 }
 @Override
 public int getNumBytes() {
   return super.getNumBytes() + PacketUtil.getNumBytes(getUrl()) + 1;
 }