@ Override public void write ( final char [ ] cbuf , final int off , final int len ) throws IOException { if ( buffer == null ) { // Nothing to replace, just pass the data through backing . write ( cbuf , off , len ) ; } else { for ( int i = off ; i < off + len ; i ++ ) { buffer [ bufferLen ++ ] = cbuf [ i ] ; if ( bufferLen == buffer . length ) { writeBuf ( buffer . length / 2 ) ; } } } }
Implementation of Writer s write method .