* source packet
* @return number of bytes copied
*/
public int transferStateAndDataFrom(JPacket packet) {
int len = packet.state.size() + packet.size();
JBuffer mem = getMemoryBuffer(len);
int o = packet.state.transferTo(mem, 0, packet.state.size(), 0);
o += packet.transferTo(mem, 0, packet.size(), o);
return o;