Package org.eclipse.jgit.transport
Class PackedObjectInfo
- java.lang.Object
-
- org.eclipse.jgit.lib.AnyObjectId
-
- org.eclipse.jgit.lib.ObjectId
-
- org.eclipse.jgit.lib.ObjectIdOwnerMap.Entry
-
- org.eclipse.jgit.transport.PackedObjectInfo
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<AnyObjectId>
- Direct Known Subclasses:
ObjectToPack
public class PackedObjectInfo extends ObjectIdOwnerMap.Entry
Description of an object stored in a pack file, including offset.When objects are stored in packs Git needs the ObjectId and the offset (starting position of the object data) to perform random-access reads of objects from the pack. This extension of ObjectId includes the offset.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PackedObjectInfo(AnyObjectId id)
Create a new structure to remember information about an object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getCRC()
long
getOffset()
void
setCRC(int crc)
Record the 32 bit CRC checksum for the packed data.void
setOffset(long offset)
Set the offset in pack when object has been written to.-
Methods inherited from class org.eclipse.jgit.lib.ObjectId
equals, fromRaw, fromRaw, fromRaw, fromRaw, fromString, fromString, isId, toObjectId, toString, zeroId
-
-
-
-
Constructor Detail
-
PackedObjectInfo
public PackedObjectInfo(AnyObjectId id)
Create a new structure to remember information about an object.- Parameters:
id
- the identity of the object the new instance tracks.
-
-
Method Detail
-
getOffset
public long getOffset()
- Returns:
- offset in pack when object has been already written, or 0 if it has not been written yet
-
setOffset
public void setOffset(long offset)
Set the offset in pack when object has been written to.- Parameters:
offset
- offset where written object starts
-
getCRC
public int getCRC()
- Returns:
- the 32 bit CRC checksum for the packed data.
-
setCRC
public void setCRC(int crc)
Record the 32 bit CRC checksum for the packed data.- Parameters:
crc
- checksum of all packed data (including object type code, inflated length and delta base reference) as computed byCRC32
.
-
-