question: public static int readFully ( InputStream inStr , byte [ ] buf , int off , int len ) throws IOException { int totalRead = 0 ; while ( totalRead < len ) { int numRead = inStr . read ( buf , off + totalRead , len - totalRead ) ; if ( numRead < 0 ) { break ; } totalRead += numRead ; } return totalRead ; }
target:  Fully read in len's bytes of data into buf, or up to EOF, whichever occurs first,