src/org/jnetpcap/packet/JMemoryPacket.java
public int transferStateAndDataTo(JBuffer buffer, int offset) {
		int o = state.transferTo(buffer, 0, state.size(), offset);
		o += super.transferTo(buffer, 0, size(), offset + o);

		return o;
	}
/**
	 * Copies contents of this packet to buffer. The packets capture 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 both state and data in the form
	 * 
	 *          <pre>
	 * +--------------+-------------+
	 * | packet state | packet data |
	 * +--------------+-------------+
	 * </pre>
	 * @param offset
	 *          the offset
	 * @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>
	 * +-----+----+
	 * |State|Data|
	 * +-----+----+
	 * </pre>
	 * 
	 *         </p>
	 */
Copies contents of this packet to buffer. The packets capture 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 both state and data in the form


| packet state | packet data |

@param offset
the offset
@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.


|State|Data|



Copies contents of this packet to buffer . The packets capture 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 both state and data in the form | packet state | packet data | @param offset the offset @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 . |State|Data|
public int transferStateAndDataTo(JBuffer buffer, int offset) {
		int o = state.transferTo(buffer, 0, state.size(), offset);
		o += super.transferTo(buffer, 0, size(), offset + o);
		return o;
	}
public int transferStateAndDataTo ( JBuffer buffer , int offset ) { int o = state . transferTo ( buffer , 0 , state . size ( ) , offset ) ; o += super . transferTo ( buffer , 0 , size ( ) , offset + o ) ; return o ; }
Copies contents of this packet to buffer.
Copies contents of this packet to buffer .