static void copyToArray(long srcAddr,Object dst,long dstBaseOffset,long dstPos,long length){
  long offset=dstBaseOffset + dstPos;
  while (length > 0) {
    long size=(length > UNSAFE_COPY_THRESHOLD) ? UNSAFE_COPY_THRESHOLD : length;
    unsafe.copyMemory(null,srcAddr,dst,offset,size);
    length-=size;
    srcAddr+=size;
    offset+=size;
  }
}

static void copyToArray ( long srcAddr , Object dst , long dstBaseOffset , long dstPos , long length ) { long offset = dstBaseOffset + dstPos ; while ( length > 0 ) { long size = ( length > UNSAFE_COPY_THRESHOLD ) ? UNSAFE_COPY_THRESHOLD : length ; unsafe . copyMemory ( null , srcAddr , dst , offset , size ) ; length -= size ; srcAddr += size ; offset += size ; } }
copy from source address into given destination array .
