Class LocalObjectRepresentation
- java.lang.Object
-
- org.eclipse.jgit.internal.storage.pack.StoredObjectRepresentation
-
- org.eclipse.jgit.internal.storage.file.LocalObjectRepresentation
-
- Direct Known Subclasses:
LocalObjectRepresentation.Delta
class LocalObjectRepresentation extends StoredObjectRepresentation
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
LocalObjectRepresentation.Delta
-
Field Summary
Fields Modifier and Type Field Description private ObjectId
baseId
private long
baseOffset
(package private) long
length
(package private) long
offset
(package private) PackFile
pack
-
Fields inherited from class org.eclipse.jgit.internal.storage.pack.StoredObjectRepresentation
FORMAT_OTHER, PACK_DELTA, PACK_WHOLE, WEIGHT_UNKNOWN
-
-
Constructor Summary
Constructors Constructor Description LocalObjectRepresentation()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectId
getDeltaBase()
Get identity of the object this delta applies to in order to recover the original object content.int
getWeight()
Get relative size of this object's packed form.(package private) static LocalObjectRepresentation
newDelta(PackFile f, long p, long n, long base)
(package private) static LocalObjectRepresentation
newDelta(PackFile f, long p, long n, ObjectId base)
(package private) static LocalObjectRepresentation
newWhole(PackFile f, long p, long length)
-
Methods inherited from class org.eclipse.jgit.internal.storage.pack.StoredObjectRepresentation
getFormat, wasDeltaAttempted
-
-
-
-
Method Detail
-
newWhole
static LocalObjectRepresentation newWhole(PackFile f, long p, long length)
-
newDelta
static LocalObjectRepresentation newDelta(PackFile f, long p, long n, ObjectId base)
-
newDelta
static LocalObjectRepresentation newDelta(PackFile f, long p, long n, long base)
-
getWeight
public int getWeight()
Get relative size of this object's packed form.- Overrides:
getWeight
in classStoredObjectRepresentation
- Returns:
- relative size of this object's packed form. The special value
StoredObjectRepresentation.WEIGHT_UNKNOWN
can be returned to indicate the implementation doesn't know, or cannot supply the weight up front.
-
getDeltaBase
public ObjectId getDeltaBase()
Get identity of the object this delta applies to in order to recover the original object content.- Overrides:
getDeltaBase
in classStoredObjectRepresentation
- Returns:
- identity of the object this delta applies to in order to recover
the original object content. This method should only be called if
StoredObjectRepresentation.getFormat()
returnedStoredObjectRepresentation.PACK_DELTA
.
-
-