question: protected int readFully ( InputStream in , byte buffer [ ] , int offset , int len ) throws java . io . IOException { for ( int i = 0 ; i < len ; i ++ ) { int q = in . read ( ) ; if ( q == - 1 ) return ( ( i == 0 ) ? - 1 : i ) ; buffer [ i + offset ] = ( byte ) q ; } return len ; }
target:  130 * This method works around the bizarre semantics of BufferedInputStream's 131 * read method. 132