question: public static void readFully ( InputStream in , byte buf [ ] , int off , int len ) throws IOException { int toRead = len ; while ( toRead > 0 ) { int ret = in . read ( buf , off , toRead ) ; if ( ret < 0 ) { throw new IOException ( "Premature EOF from inputStream" ) ; } toRead -= ret ; off += ret ; } }
target:  Does the readFully based on the Input read.