docs: private final void _writeSegment(int end)
          throws IOException, JsonGenerationException
      {
          final int[] escCodes = _outputEscapes;
          final int escLen = escCodes.length;
      
          int ptr = 0;
          int start = ptr;
  
          output_loop:
          while (ptr < end) {
              // Fast loop for chars not needing escaping
              char c;
              while (true) {
                  c = _outputBuffer[ptr];
                  if (c < escLen && escCodes[c] != 0) {
                      break;
                  }
                  if (++ptr >= end) {
                      break;
                  }
              }
  
              // Ok, bumped into something that needs escaping.
              /* First things first: need to flush the buffer.
               * Inlined, as we don't want to lose tail pointer
               */
              int flushLen = (ptr - start);
              if (flushLen > 0) {
                  _writer.write(_outputBuffer, start, flushLen);
                  if (ptr >= end) {
                      break output_loop;
                  }
              }
              ++ptr;
              // So; either try to prepend (most likely), or write directly:
              start = _prependOrWriteCharacterEscape(_outputBuffer, ptr, end, c, escCodes[c]);
          }
      }