src/org/jnetpcap/packet/PcapPacket.java
public int transferStateAndDataTo(ByteBuffer buffer) {
		int o = header.transferTo(buffer);
		o += state.transferTo(buffer);
		o += super.transferTo(buffer);

		return o;
	}
/**
	 * Copies contents of this packet to buffer. The packets capture header, state
	 * and packet data are copied to new buffer. After completion of this
	 * operation the complete contents and state of the packet will be transfered
	 * to the buffer. The layout of the buffer data will be as described below. A
	 * buffer with this type of layout is suitable for any transferStateAndData or
	 * peer methods for any buffers that are JMemory based. The buffer has to be
	 * large enough to hold all of the packet content as returned by method
	 * 
	 * @param buffer
	 *          buffer containing capture header, packet state and data buffer
	 *          sequentially in the buffer
	 * @return number of bytes copied {@link #getTotalSize()}. If the buffer is
	 *         too small and a runtime exception may be thrown.
	 *         <p>
	 *         The buffer layout will look like the following:
	 * 
	 *         <pre>
	 * +----------+-----+----+
	 * |PcapHeader|State|Data|
	 * +----------+-----+----+
	 * </pre>
	 * 
	 *         </p>
	 */
Copies contents of this packet to buffer. The packets capture header, state
and packet data are copied to new buffer. After completion of this
operation the complete contents and state of the packet will be transfered
to the buffer. The layout of the buffer data will be as described below. A
buffer with this type of layout is suitable for any transferStateAndData or
peer methods for any buffers that are JMemory based. The buffer has to be
large enough to hold all of the packet content as returned by method

@param buffer
buffer containing capture header, packet state and data buffer
sequentially in the buffer
@return number of bytes copied  #getTotalSize(). If the buffer is
too small and a runtime exception may be thrown.

The buffer layout will look like the following.




Copies contents of this packet to buffer . The packets capture header state and packet data are copied to new buffer . After completion of this operation the complete contents and state of the packet will be transfered to the buffer . The layout of the buffer data will be as described below . A buffer with this type of layout is suitable for any transferStateAndData or peer methods for any buffers that are JMemory based . The buffer has to be large enough to hold all of the packet content as returned by method @param buffer buffer containing capture header packet state and data buffer sequentially in the buffer @return number of bytes copied #getTotalSize () . If the buffer is too small and a runtime exception may be thrown . The buffer layout will look like the following .
public int transferStateAndDataTo(ByteBuffer buffer) {
		int o = header.transferTo(buffer);
		o += state.transferTo(buffer);
		o += super.transferTo(buffer);
		return o;
	}
public int transferStateAndDataTo ( ByteBuffer buffer ) { int o = header . transferTo ( buffer ) ; o += state . transferTo ( buffer ) ; o += super . transferTo ( buffer ) ; return o ; }
Copies contents of this packet to buffer.
Copies contents of this packet to buffer .