question: private int read ( int n ) throws IOException { if ( closed ) { return 0 ; } int c ; int i = n ; while ( -- i >= 0 ) { c = is . read ( ) ; if ( c < 0 ) { closed = true ; break ; } buff . append ( ( char ) c ) ; } return n - i ; }
target:  Reads n characters from the stream and appends them to the buffer 