(long eocdRecordOffset, int commentLength)
| 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()); |
no test coverage detected