public static void getBytes(long address, byte[] buffer, int bufferOffset, int count) {
        if (buffer == null)
            throw new NullPointerException();
        else if (bufferOffset < 0 || count < 0 || count > buffer.length - bufferOffset)
            throw new IndexOutOfBoundsException();
        else if (count == 0)
            return;

        unsafe.copyMemory(null, address, buffer, BYTE_ARRAY_BASE_OFFSET + bufferOffset, count);
    }
Transfers objCount bytes from Memory starting at memoryOffset to buffer starting at bufferOffset

@param address      start offset in the memory
@param buffer       the data buffer
@param bufferOffset start offset of the buffer
@param count        number of bytes to transfer
indexr-common/src/main/java/io/indexr/util/MemoryUtil.java