|
||||||||||
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 packFile)
Construct a reader for an existing, pre-indexed packfile. |
Method Summary | |
---|---|
void |
close()
Close the resources utilized by this repository |
PackIndex |
getIndex()
|
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. |
boolean |
shouldBeKept()
Determines whether a .keep file exists for 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 packFile)
packFile
- path of the .pack
file holding the data.Method Detail |
---|
public File getPackFile()
public PackIndex getIndex() throws IOException
IOException
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 boolean shouldBeKept()
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 |