* @param packet
* destination packet to which to copy header, state and packet data
* @return number of bytes copied
*/
public int transferStateAndDataTo(PcapPacket packet) {
JBuffer buffer = packet.getMemoryBuffer(this.getTotalSize());
int o = header.transferTo(buffer, 0);
packet.header.peerTo(buffer, 0);
packet.state.peerTo(buffer, o, state.size());