// @Override public void readRaw(ByteBuffer buffer) throws NullPointerException { super.readRaw(buffer); // data this.data = RawTransUtil.getString(buffer); // type this.type = buffer.getInt(); // label this.label = RawTransUtil.getString(buffer); // protocol this.protocol = buffer.getInt(); // customProtocol this.customProtocol = RawTransUtil.getString(buffer); }
// @Override public void writeRaw(ByteBuffer buffer) throws NullPointerException { super.writeRaw(buffer); // data RawTransUtil.putString(buffer, this.data); // type buffer.putInt(this.type); // label RawTransUtil.putString(buffer, this.label); // protocol buffer.putInt(this.protocol); // customProtocol RawTransUtil.putString(buffer, this.customProtocol); }