question: public int read ( char [ ] cbuf , int off , int len ) throws IOException { int num = 0 ; int val ; if ( bo == 'b' ) { while ( num < len ) { if ( ( val = is . read ( ) ) < 0 ) { return ( num != 0 ) ? num : - 1 ; } cbuf [ off ++ ] = ( char ) ( ( val << 8 ) | ( is . read ( ) & 0xff ) ) ; num ++ ; } } else { while ( num < len ) { if ( ( val = is . read ( ) ) < 0 ) { return ( num != 0 ) ? num : - 1 ; } cbuf [ off ++ ] = ( char ) ( ( is . read ( ) << 8 ) | ( val & 0xff ) ) ; num ++ ; } } return num ; }
target:  Reads characters into a portion of an array.