public boolean nextInput ( ) throws IOException { if ( ! options . contains ( READ ) && ! inflater . finished ( ) ) { throw new IllegalStateException ( "should be called after read returns -1" ) ; } if ( ! compBuf . hasRemaining ( ) ) { compBuf . clear ( ) ; int rc = channel . read ( compBuf ) ; if ( rc == - 1 ) { return false ; } compBuf . flip ( ) ; } readHeader ( ) ; inflater . reset ( ) ; crc32 . reset ( ) ; return true ; }
After read returns - 1 call nextInput to advance to nextInput file .