aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/src/org/eclipse/jgit/lib/WindowCursor.java
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/lib/WindowCursor.java')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/WindowCursor.java18
1 files changed, 9 insertions, 9 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/WindowCursor.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/WindowCursor.java
index e167354928..36095ed5e3 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/WindowCursor.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/WindowCursor.java
@@ -49,6 +49,7 @@ import java.util.zip.DataFormatException;
import java.util.zip.Inflater;
import org.eclipse.jgit.errors.MissingObjectException;
+import org.eclipse.jgit.errors.StoredObjectRepresentationNotAvailableException;
import org.eclipse.jgit.revwalk.RevObject;
/** Active handle to a ByteWindow. */
@@ -90,6 +91,12 @@ final class WindowCursor extends ObjectReader implements ObjectReuseAsIs {
db.selectObjectRepresentation(packer, otp, this);
}
+ public void copyObjectAsIs(PackOutputStream out, ObjectToPack otp)
+ throws IOException, StoredObjectRepresentationNotAvailableException {
+ LocalObjectToPack src = (LocalObjectToPack) otp;
+ src.copyFromPack.copyAsIs(out, src, this);
+ }
+
/**
* Copy bytes from the window to a caller supplied buffer.
*
@@ -159,16 +166,9 @@ final class WindowCursor extends ObjectReader implements ObjectReuseAsIs {
}
}
- void inflateVerify(final PackFile pack, long position) throws IOException,
- DataFormatException {
+ Inflater inflater() {
prepareInflater();
- for (;;) {
- pin(pack, position);
- window.inflateVerify(position, inf);
- if (inf.finished())
- return;
- position = window.end;
- }
+ return inf;
}
private void prepareInflater() {