question: public static int readChars ( Reader r , char [ ] charArray ) throws IOException { int totalCharsRead = 0 ; int charsRead = r . read ( charArray ) ; while ( charsRead >= 0 ) { totalCharsRead += charsRead ; if ( totalCharsRead == charArray . length ) { break ; } charsRead = r . read ( charArray , totalCharsRead , charArray . length - totalCharsRead ) ; } return totalCharsRead ; }
target:  Fills the supplied character array with characters read from the specified Reader. This method will only stop reading when the character array has been filled completely, or the end of the stream has been reached.