public void getBytes(long memoryOffset, 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;

        checkPosition(memoryOffset);
        long end = memoryOffset + count;
        checkPosition(end - 1);
        while (memoryOffset < end)
        {
            buffer[bufferOffset++] = unsafe.getByte(peer + memoryOffset);
            memoryOffset++;
        }
    }
public void getBytes ( long memoryOffset , 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 ; checkPosition ( memoryOffset ) ; long end = memoryOffset + count ; checkPosition ( end - 1 ) ; while ( memoryOffset < end ) { buffer [ bufferOffset ++ ] = unsafe . getByte ( peer + memoryOffset ) ; memoryOffset ++ ; } }
Transfers count bytes from Memory starting at memoryOffset to buffer starting at bufferOffset

@param memoryOffset start offset in the memory
@param buffer the data buffer
@param bufferOffset start offset of the buffer
@param count number of bytes to transfer