src/org/jnetpcap/packet/PcapPacket.java
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());
		o += state.transferTo(packet.state);

		packet.peer(buffer, o, size());
		o += this.transferTo(buffer, 0, size(), o);

		return o;
	}
/**
	 * Deep copy of the this packet to the supplied packet. Contents of the this
	 * packet such as pcap header, packet state and packet data are deep copied
	 * into the suppliedpacket, allocating memory if necessary or existing memory
	 * buffer if it is large enough to hold the new packet with its complete
	 * state. In either case, the packet will be stored with its header and state
	 * in a single contigues buffer in the supplied packet.
	 * 
	 * @param packet
	 *          destination packet to which to copy header, state and packet data
	 * @return number of bytes copied
	 */
Deep copy of the this packet to the supplied packet. Contents of the this
packet such as pcap header, packet state and packet data are deep copied
into the suppliedpacket, allocating memory if necessary or existing memory
buffer if it is large enough to hold the new packet with its complete
state. In either case, the packet will be stored with its header and state
in a single contigues buffer in the supplied packet.

@param packet
destination packet to which to copy header, state and packet data
@return number of bytes copied
Deep copy of the this packet to the supplied packet . Contents of the this packet such as pcap header packet state and packet data are deep copied into the suppliedpacket allocating memory if necessary or existing memory buffer if it is large enough to hold the new packet with its complete state . In either case the packet will be stored with its header and state in a single contigues buffer in the supplied packet . @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());
		o += state.transferTo(packet.state);
		packet.peer(buffer, o, size());
		o += this.transferTo(buffer, 0, size(), o);
		return o;
	}
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 ( ) ) ; o += state . transferTo ( packet . state ) ; packet . peer ( buffer , o , size ( ) ) ; o += this . transferTo ( buffer , 0 , size ( ) , o ) ; return o ; }
Deep copy of the this packet to the supplied packet.
Deep copy of the this packet to the supplied packet .