static IoBuffer copy(ByteBuffer src){
  IoBuffer copy=IoBuffer.allocate(src.remaining());
  copy.put(src);
  copy.flip();
  return copy;
}

static IoBuffer copy ( ByteBuffer src ) { IoBuffer copy = IoBuffer . allocate ( src . remaining ( ) ) ; copy . put ( src ) ; copy . flip ( ) ; return copy ; }
creates a new mina buffer that is a deep copy of the remaining bytes in the given buffer ( between index buf . position ( ) and buf . limit ( ) )
