|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.jgit.storage.file.PackFile
public class PackFile
A Git version 2 pack file representation. A pack file contains Git objects in delta packed format yielding high compression of lots of object where some objects are similar.
| Field Summary | |
|---|---|
static Comparator<PackFile> |
SORT
Sorts PackFiles to be most recently created to least recently created. |
| Constructor Summary | |
|---|---|
PackFile(File idxFile,
File packFile)
Construct a reader for an existing, pre-indexed packfile. |
|
| Method Summary | |
|---|---|
void |
close()
Close the resources utilized by this repository |
File |
getPackFile()
|
String |
getPackName()
|
boolean |
hasObject(AnyObjectId id)
Determine if an object is contained within the pack file. |
Iterator<PackIndex.MutableEntry> |
iterator()
Provide iterator over entries in associated pack index, that should also exist in this pack file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final Comparator<PackFile> SORT
| Constructor Detail |
|---|
public PackFile(File idxFile,
File packFile)
idxFile - path of the .idx file listing the contents.packFile - path of the .pack file holding the data.| Method Detail |
|---|
public File getPackFile()
public String getPackName()
pack-*.pack pattern.
public boolean hasObject(AnyObjectId id)
throws IOException
For performance reasons only the index file is searched; the main pack content is ignored entirely.
id - the object to look for. Must not be null.
IOException - the index file cannot be loaded into memory.public void close()
public Iterator<PackIndex.MutableEntry> iterator()
Iterator returns objects in SHA-1 lexicographical order.
iterator in interface Iterable<PackIndex.MutableEntry>PackIndex.iterator()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||