src/org/jnetpcap/packet/JMemoryPacket.java
public int transferStateAndDataFrom(ByteBuffer buffer) {
		final int len = buffer.limit() - buffer.position();
		JBuffer b = getMemoryBuffer(len);

		b.transferFrom(buffer, 0);

		return peerStateAndData(b, 0);
	}
/**
	 * Performs a deep copy of the contents of the buffer into packet's internal
	 * memory buffer if that buffer is large enough, otherwise a new buffer is
	 * allocated. Both packet's state and data are then peered with the internal
	 * buffer containing the copy of the supplied buffer
	 * 
	 * @param buffer
	 *          buffer containing both state and data in the form
	 * 
	 * <pre>
	 *          +--------------+-------------+
	 *          | packet state | packet data |
	 *          +--------------+-------------+
	 * </pre>
	 * 
	 * @return number of bytes copied
	 */
Performs a deep copy of the contents of the buffer into packet's internal
memory buffer if that buffer is large enough, otherwise a new buffer is
allocated. Both packet's state and data are then peered with the internal
buffer containing the copy of the supplied buffer

@param buffer
buffer containing both state and data in the form


| packet state | packet data |


@return number of bytes copied
Performs a deep copy of the contents of the buffer into packet ' s internal memory buffer if that buffer is large enough otherwise a new buffer is allocated . Both packet ' s state and data are then peered with the internal buffer containing the copy of the supplied buffer @param buffer buffer containing both state and data in the form | packet state | packet data | @return number of bytes copied
public int transferStateAndDataFrom(ByteBuffer buffer) {
		final int len = buffer.limit() - buffer.position();
		JBuffer b = getMemoryBuffer(len);
		b.transferFrom(buffer, 0);
		return peerStateAndData(b, 0);
	}
public int transferStateAndDataFrom ( ByteBuffer buffer ) { final int len = buffer . limit ( ) - buffer . position ( ) ; JBuffer b = getMemoryBuffer ( len ) ; b . transferFrom ( buffer , 0 ) ; return peerStateAndData ( b , 0 ) ; }
Performs a deep copy of the contents of the buffer into packet's internal
 memory buffer if that buffer is large enough, otherwise a new buffer is
 allocated.
Performs a deep copy of the contents of the buffer into packet ' s internal memory buffer if that buffer is large enough otherwise a new buffer is allocated .