code: public void unshare(int needExtra)
      {
          int len = mInputLen;
          mInputLen = 0;
          char[] inputBuf = mInputBuffer;
          mInputBuffer = null;
          int start = mInputStart;
          mInputStart = -1;
  
          // Is buffer big enough, or do we need to reallocate?
          int needed = len+needExtra;
          if (mCurrentSegment == null || needed > mCurrentSegment.length) {
              mCurrentSegment = allocBuffer(needed);
          }
          if (len > 0) {
              System.arraycopy(inputBuf, start, mCurrentSegment, 0, len);
          }
          mSegmentSize = 0;
          mCurrentSize = len;
      }
docs: Method called if/when we need to append content when we have been
  initialized to use shared buffer.