private final void _writeStringSegments(char[] cbuf,int offset,int totalLen) throws IOException, JsonGenerationException {
  do {
    int len=Math.min(_outputMaxContiguous,totalLen);
    if ((_outputTail + len) > _outputEnd) {
      _flushBuffer();
    }
    _writeStringSegment(cbuf,offset,len);
    offset+=len;
    totalLen-=len;
  }
 while (totalLen > 0);
}

private final void _writeStringSegments ( char [ ] cbuf , int offset , int totalLen ) throws IOException , JsonGenerationException { do { int len = Math . min ( _outputMaxContiguous , totalLen ) ; if ( ( _outputTail + len ) > _outputEnd ) { _flushBuffer ( ) ; } _writeStringSegment ( cbuf , offset , len ) ; offset += len ; totalLen -= len ; } while ( totalLen > 0 ) ; }
method called when character sequence to write is long enough that its maximum encoded and escaped form is not guaranteed to fit in the output buffer . if so , we will need to choose smaller output chunks to write at a time .
