|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.jgit.lib.PackIndex
public abstract class PackIndex
Access path to locate objects by ObjectId in a PackFile.
Indexes are strictly redundant information in that we can rebuild all of the data held in the index file from the on disk representation of the pack file itself, but it is faster to access for random requests because data is stored by ObjectId.
| Nested Class Summary | |
|---|---|
static class |
PackIndex.MutableEntry
Represent mutable entry of pack index consisting of object id and offset in pack (both mutable). |
| Field Summary | |
|---|---|
protected byte[] |
packChecksum
Footer checksum applied on the bottom of the pack file. |
| Constructor Summary | |
|---|---|
PackIndex()
|
|
| Method Summary | |
|---|---|
boolean |
hasObject(AnyObjectId id)
Determine if an object is contained within the pack file. |
abstract java.util.Iterator<PackIndex.MutableEntry> |
iterator()
Provide iterator that gives access to index entries. |
static PackIndex |
open(java.io.File idxFile)
Open an existing pack .idx file for reading. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected byte[] packChecksum
| Constructor Detail |
|---|
public PackIndex()
| Method Detail |
|---|
public static PackIndex open(java.io.File idxFile)
throws java.io.IOException
.idx file for reading.
The format of the file will be automatically detected and a proper access implementation for that format will be constructed and returned to the caller. The file may or may not be held open by the returned instance.
idxFile - existing pack .idx to read.
java.io.FileNotFoundException - the file does not exist.
java.io.IOException - the file exists but could not be read due to security errors,
unrecognized data version, or unexpected data corruption.public boolean hasObject(AnyObjectId id)
id - the object to look for. Must not be null.
public abstract java.util.Iterator<PackIndex.MutableEntry> iterator()
Iterator returns objects in SHA-1 lexicographical order.
iterator in interface java.lang.Iterable<PackIndex.MutableEntry>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||