code: public void _writeString(String text) throws IOException
  	{
  
  		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 (_characterEscapes != null) {
  			_writeStringCustom(len);
  		} else if (_maximumNonEscapedChar != 0) {
  			_writeStringASCII(len, _maximumNonEscapedChar);
  		} else {
  			_writeString2(len);
  		}
  	}
docs: /*
  ********************************************************
  /* Internal methods, low-level writing; text, default
  ********************************************************