Packet implementation for Java