public class PackedObjectInfo extends ObjectIdOwnerMap.Entry
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.
Constructor and Description |
---|
PackedObjectInfo(AnyObjectId id)
Create a new structure to remember information about an object.
|
Modifier and Type | Method and Description |
---|---|
int |
getCRC()
Get the 32 bit CRC checksum for the packed data.
|
long |
getOffset()
Get offset in pack when object has been already written
|
int |
getType()
Get the object type.
|
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.
|
void |
setType(int type)
Record the object type if applicable.
|
equals, fromRaw, fromRaw, fromRaw, fromRaw, fromString, fromString, isId, toObjectId, toString, zeroId
abbreviate, compareTo, compareTo, compareTo, copy, copyRawTo, copyRawTo, copyRawTo, copyRawTo, copyTo, copyTo, copyTo, copyTo, copyTo, copyTo, equals, equals, equals, getByte, getFirstByte, getName, hashCode, isEqual, name, startsWith, toString
public PackedObjectInfo(AnyObjectId id)
id
- the identity of the object the new instance tracks.public long getOffset()
public void setOffset(long offset)
offset
- offset where written object startspublic int getCRC()
public void setCRC(int crc)
crc
- checksum of all packed data (including object type code,
inflated length and delta base reference) as computed by
CRC32
.public int getType()
public void setType(int type)
type
- the object type.Copyright © 2021 Eclipse JGit Project. All rights reserved.