@Override
public TransactionMessage decode(ChannelBuffer buffer) throws IOException {
int id = buffer.readUnsignedByte();
int transaction = buffer.readUnsignedShort();
boolean accepted = buffer.readUnsignedByte() != 0;
return new TransactionMessage(id, transaction, accepted);
}