docs: private void _writeString(String text)
          throws IOException, JsonGenerationException
      {
          /* One check first: if String won't fit in the buffer, let's
           * segment writes. No point in extending buffer to huge sizes
           * (like if someone wants to include multi-megabyte base64
           * encoded stuff or such)
           */
          final int len = text.length();
          if (len > _outputEnd) { // Let's reserve space for entity at begin/end
              _writeLongString(text);
              return;
          }
  
          // Ok: we know String will fit in buffer ok
          // But do we need to flush first?
          if ((_outputTail + len) > _outputEnd) {
              _flushBuffer();
          }
          text.getChars(0, len, _outputBuffer, _outputTail);
  
          if (_maximumNonEscapedChar != 0) {
              _writeStringASCII(len, _maximumNonEscapedChar);
          } else {
              _writeString2(len);
          }
      }