implemented a Packet and the associated PacketInputStream and
PacketOutputStream