private ByteBuffer copy(ByteBuffer original){
  ByteBuffer cp=directBuf ? ByteBuffer.allocateDirect(original.remaining()) : ByteBuffer.allocate(original.remaining());
  cp.order(order);
  cp.put(original);
  cp.flip();
  return cp;
}

private ByteBuffer copy ( ByteBuffer original ) { ByteBuffer cp = directBuf ? ByteBuffer . allocateDirect ( original . remaining ( ) ) : ByteBuffer . allocate ( original . remaining ( ) ) ; cp . order ( order ) ; cp . put ( original ) ; cp . flip ( ) ; return cp ; }
copies the given byte buffer .
