code: private void copyToStrBuffer(byte[] buffer, int offset, int length) {
      Preconditions.checkArgument(length >= 0);
      if (strBuffer.length - strBufferIndex < length) {
        // cannot fit, expanding buffer
        expandStrBuffer(length);
      }
      System.arraycopy(
        buffer, offset, strBuffer, strBufferIndex, Math.min(length, MAX_ALLOWABLE_BUFFER_SIZE - strBufferIndex));
      strBufferIndex += length;
    }
docs: Copies from buffer to our internal strBufferIndex, expanding the internal buffer if necessary
  @param offset offset in the buffer to start copying from
  @param length length to copy