public void write ( String s , int offset , int length ) throws IOException { while ( length > 0 ) { if ( _tail == null ) addBuffer ( TempCharBuffer . allocate ( ) ) ; else if ( _tail . _buf . length <= _tail . _length ) { addBuffer ( TempCharBuffer . allocate ( ) ) ; // XXX: see TempStream for backing files } int sublen = _tail . _buf . length - _tail . _length ; if ( length < sublen ) sublen = length ; s . getChars ( offset , offset + sublen , _tail . _buf , _tail . _length ) ; offset += sublen ; length -= sublen ; _tail . _length += sublen ; } }
Writes part of a string .