MCPcopy Create free account
hub / github.com/L-JINBIN/ApkDataMultiplexing / parseZip64EocdRecord

Method parseZip64EocdRecord

src/bin/zip/ZipFile.java:211–232  ·  view source on GitHub ↗
(long eocdRecordOffset, int commentLength)

Source from the content-addressed store, hash-verified

209 }
210
211 private EocdRecord parseZip64EocdRecord(long eocdRecordOffset, int commentLength) throws IOException {
212 _seek(eocdRecordOffset);
213 final int signature = _readInt();
214 if (signature != ZIP64_EOCD_RECORD_SIGNATURE) {
215 throw new IOException("Invalid zip64 eocd record offset, sig="
216 + Integer.toHexString(signature) + " offset=" + eocdRecordOffset);
217 }
218 _skip(12);
219 int diskNumber = _readInt();
220 int diskWithCentralDirStart = _readInt();
221 long numEntries = _readLong();
222 long totalNumEntries = _readLong();
223 _readLong();
224 long centralDirOffset = _readLong();
225 if (numEntries != totalNumEntries || diskNumber != 0 || diskWithCentralDirStart != 0) {
226 throw new IOException("Spanned archives not supported :" +
227 " numEntries=" + numEntries + ", totalNumEntries=" + totalNumEntries +
228 ", diskNumber=" + diskNumber + ", diskWithCentralDirStart=" +
229 diskWithCentralDirStart);
230 }
231 return new EocdRecord(numEntries, centralDirOffset, commentLength, true);
232 }
233
234 public InputStream getRawInputStream(ZipEntry ze) {
235 return new BridgeInputStream(archive, ze.getDataOffset(), ze.getCompressedSize());

Callers 1

readEocdRecordMethod · 0.95

Calls 4

_seekMethod · 0.95
_readIntMethod · 0.95
_skipMethod · 0.95
_readLongMethod · 0.95

Tested by

no test coverage detected