throws IOException {
final long objectOffset = loader.objectOffset;
final long dataOffset = objectOffset + loader.headerSize;
- final int cnt = (int) (findEndOffset(objectOffset) - dataOffset);
+ final long sz = findEndOffset(objectOffset) - dataOffset;
final PackIndex idx = idx();
if (idx.hasCRC32Support()) {
headerCnt -= toRead;
}
final CheckedOutputStream crcOut = new CheckedOutputStream(out, crc);
- copyToStream(dataOffset, buf, cnt, crcOut, curs);
+ copyToStream(dataOffset, buf, sz, crcOut, curs);
final long computed = crc.getValue();
final ObjectId id = findObjectForOffset(objectOffset);
coe.initCause(dfe);
throw coe;
}
- copyToStream(dataOffset, buf, cnt, out, curs);
+ copyToStream(dataOffset, buf, sz, out, curs);
}
}