@Override public byte[] encode() { final ByteBuffer bb = ByteBuffer.allocate(12 + this.m_action.serializedSize()); bb.putInt(this.m_action.getId()); bb.putLong(this.m_itemId); this.m_action.serialize(bb); return this.addClientHeader((byte) 3, bb.array()); }
@Override public byte[] encode() { final ByteBuffer buffer = ByteBuffer.allocate(5 + this.m_action.serializedSize()); buffer.putInt(this.m_compartmentId); buffer.put((byte) this.m_action.getType().ordinal()); this.m_action.serializeIn(buffer); return this.addClientHeader((byte) 3, buffer.array()); }