static public void writeStringAsCharArray(Writer writer, String str, int off, int len) throws IOException {
        if (!enabled) {
            writeStringFallback(writer, str, off, len);
            return;
        }

        char[] value;
        int internalOffset=0;
        try {
            value = (char[])valueField.get(str);
            if(!jdk7_string) {
                internalOffset = offsetField.getInt(str);
            }
        }
        catch (Exception e) {
            handleError(e);
            writeStringFallback(writer, str, off, len);
            return;
        }
        writer.write(value, internalOffset + off, len);
    }
static public void writeStringAsCharArray ( Writer writer , String str , int off , int len ) throws IOException { if ( ! enabled ) { writeStringFallback ( writer , str , off , len ) ; return ; } char [ ] value ; int internalOffset = 0 ; try { value = ( char [ ] ) valueField . get ( str ) ; if ( ! jdk7_string ) { internalOffset = offsetField . getInt ( str ) ; } } catch ( Exception e ) { handleError ( e ) ; writeStringFallback ( writer , str , off , len ) ; return ; } writer . write ( value , internalOffset + off , len ) ; }
Writes a portion of a string to a target java.io.Writer with direct access to the char[] of the java.lang.String

@param  writer
target java.io.Writer for output

@param  str
A String

@param  off
Offset from which to start writing characters

@param  len
Number of characters to write

@throws  IOException
If an I/O error occurs