/** * Reads the stream until it find the "End of central directory * record" and consumes it as well. */ private void skipRemainderOfArchive() throws IOException { // skip over central directory. One LFH has been read too much // already. The calculation discounts file names and extra // data so it will be too short. realSkip((long) entriesRead * CFH_LEN - LFH_LEN); findEocdRecord(); realSkip((long) ZipFile.MIN_EOCD_SIZE - WORD /* signature */ - SHORT /* comment len */); readFully(shortBuf); // file comment realSkip(ZipShort.getValue(shortBuf)); }
/** * Reads the stream until it find the "End of central directory * record" and consumes it as well. */ private void skipRemainderOfArchive() throws IOException { // skip over central directory. One LFH has been read too much // already. The calculation discounts file names and extra // data so it will be too short. realSkip((long) entriesRead * CFH_LEN - LFH_LEN); findEocdRecord(); realSkip((long) ZipFile.MIN_EOCD_SIZE - WORD /* signature */ - SHORT /* comment len */); readFully(shortBuf); // file comment realSkip(ZipShort.getValue(shortBuf)); }