this.messageSerializer = Check.notNull(messageSerializer);
}
@Override public Packet read(final Reader reader) throws Exception {
final int requestNumber = reader.readInt();
return Packet.isEnd(requestNumber) ? Packet.END : new Packet(requestNumber, (Message)messageSerializer.read(reader));
}