|
|
@ -166,6 +166,7 @@ public abstract class ObjectLoader { |
|
|
|
if (isLarge()) { |
|
|
|
if (isLarge()) { |
|
|
|
ObjectStream in = openStream(); |
|
|
|
ObjectStream in = openStream(); |
|
|
|
try { |
|
|
|
try { |
|
|
|
|
|
|
|
final long sz = in.getSize(); |
|
|
|
byte[] tmp = new byte[1024]; |
|
|
|
byte[] tmp = new byte[1024]; |
|
|
|
long copied = 0; |
|
|
|
long copied = 0; |
|
|
|
for (;;) { |
|
|
|
for (;;) { |
|
|
@ -175,7 +176,7 @@ public abstract class ObjectLoader { |
|
|
|
out.write(tmp, 0, n); |
|
|
|
out.write(tmp, 0, n); |
|
|
|
copied += n; |
|
|
|
copied += n; |
|
|
|
} |
|
|
|
} |
|
|
|
if (copied != getSize()) |
|
|
|
if (copied != sz) |
|
|
|
throw new EOFException(); |
|
|
|
throw new EOFException(); |
|
|
|
} finally { |
|
|
|
} finally { |
|
|
|
in.close(); |
|
|
|
in.close(); |
|
|
|