code: public void setBytes(long memoryOffset, byte[] buffer, int bufferOffset, int count)
      {
          if (buffer == null)
              throw new NullPointerException();
          else if (bufferOffset < 0
                   || count < 0
                   || bufferOffset + count > buffer.length)
              throw new IndexOutOfBoundsException();
          else if (count == 0)
              return;
  
          checkPosition(memoryOffset);
          long end = memoryOffset + count;
          checkPosition(end - 1);
          while (memoryOffset < end)
          {
              unsafe.putByte(peer + memoryOffset, buffer[bufferOffset]);
              memoryOffset++;
              bufferOffset++;
          }
      }
docs: Transfers count bytes from buffer to Memory
  
  @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