src/org/jnetpcap/nio/JMemoryPool.java
public synchronized int duplicate2(JMemory src1,
			JMemory src2,
			JMemory dst1,
			JMemory dst2) {
		final int size1 = src1.size;
		final int size2 = src2.size;

		final int size = src1.size + src2.size;

		final Block block = getBlock(size);
		final int offset = block.allocate(size);

		int o = src1.transferTo(block, 0, size1, offset);
		src2.transferTo(block, 0, size2, offset + o);

		dst1.peer(block, offset, size1);
		dst2.peer(block, offset + o, size2);

		return size;
	}
/**
	 * Transfers contents from src1 and src2 to a contiguous block of new memory,
	 * then peers dst1 and dst2 with the new memory, using the same sizes as src1
	 * and src2 respectively. This operation combines memory allocation,
	 * transferTo call on src1 and src2 and then peering of dst1 and dst2 with new
	 * memory in a single step.
	 * 
	 * @param src1
	 *          first src for duplicate
	 * @param src2
	 *          second src for duplicate into the same memory
	 * @param dst1
	 *          peered with new memory using src1 length
	 * @param dst2
	 *          peered with same memory at src1.length offset using src2 length as
	 *          length of peer
	 * @return total number of bytes duplicated
	 */
Transfers contents from src1 and src2 to a contiguous block of new memory,
then peers dst1 and dst2 with the new memory, using the same sizes as src1
and src2 respectively. This operation combines memory allocation,
transferTo call on src1 and src2 and then peering of dst1 and dst2 with new
memory in a single step.


Transfers contents from src1 and src2 to a contiguous block of new memory then peers dst1 and dst2 with the new memory using the same sizes as src1 and src2 respectively . This operation combines memory allocation transferTo call on src1 and src2 and then peering of dst1 and dst2 with new memory in a single step .
public synchronized int duplicate2(JMemory src1,
			JMemory src2,
			JMemory dst1,
			JMemory dst2) {
		final int size1 = src1.size;
		final int size2 = src2.size;
		final int size = src1.size + src2.size;
		final Block block = getBlock(size);
		final int offset = block.allocate(size);
		int o = src1.transferTo(block, 0, size1, offset);
		src2.transferTo(block, 0, size2, offset + o);
		dst1.peer(block, offset, size1);
		dst2.peer(block, offset + o, size2);
		return size;
	}
public synchronized int duplicate2 ( JMemory src1 , JMemory src2 , JMemory dst1 , JMemory dst2 ) { final int size1 = src1 . size ; final int size2 = src2 . size ; final int size = src1 . size + src2 . size ; final Block block = getBlock ( size ) ; final int offset = block . allocate ( size ) ; int o = src1 . transferTo ( block , 0 , size1 , offset ) ; src2 . transferTo ( block , 0 , size2 , offset + o ) ; dst1 . peer ( block , offset , size1 ) ; dst2 . peer ( block , offset + o , size2 ) ; return size ; }
Transfers contents from src1 and src2 to a contiguous block of new memory,
 then peers dst1 and dst2 with the new memory, using the same sizes as src1
 and src2 respectively.
Transfers contents from src1 and src2 to a contiguous block of new memory then peers dst1 and dst2 with the new memory using the same sizes as src1 and src2 respectively .