public void write(String s, int off, int len) throws IOException {
        ensureOpen();
        if (bufferSize == 0) {
            initOut();
            out.write(s, off, len);
            return;
        }
        int b = off, t = off + len;
        while (b < t) {
            int d = min(getRemaining(), t - b);
            s.getChars(b, b + d, buf.buf, buf.pos);
            b += d;
            buf.pos += d;
            if (getRemaining() == 0) 
                if (autoFlush)
                    flushBuffer();
                else
                    bufferOverflow();
        }
    }
public void write(String s, int off, int len) throws IOException {
        ensureOpen();
        if (bufferSize == 0) {
            initOut();
            out.write(s, off, len);
            return;
        }
        int b = off, t = off + len;
        while (b < t) {
            int d = min(getRemaining(), t - b);
            s.getChars(b, b + d, buf.buf, buf.pos);
            b += d;
            buf.pos += d;
            if (getRemaining() == 0) 
                if (autoFlush)
                    flushBuffer();
                else
                    bufferOverflow();
        }
    }
public void write ( String s , int off , int len ) throws IOException { ensureOpen ( ) ; if ( bufferSize == 0 ) { initOut ( ) ; out . write ( s , off , len ) ; return ; } int b = off , t = off + len ; while ( b < t ) { int d = min ( getRemaining ( ) , t - b ) ; s . getChars ( b , b + d , buf . buf , buf . pos ) ; b += d ; buf . pos += d ; if ( getRemaining ( ) == 0 ) if ( autoFlush ) flushBuffer ( ) ; else bufferOverflow ( ) ; } }
Write a portion of a String.

@param  s     String to be written
@param  off   Offset from which to start reading characters
@param  len   Number of characters to be written
Write a portion of a String .