Class PackIndexWriterV2
- java.lang.Object
-
- org.eclipse.jgit.internal.storage.file.PackIndexWriter
-
- org.eclipse.jgit.internal.storage.file.PackIndexWriterV2
-
class PackIndexWriterV2 extends PackIndexWriter
Creates the version 2 pack table of contents files.- See Also:
PackIndexWriter,PackIndexV2
-
-
Field Summary
Fields Modifier and Type Field Description private static intIS_OFFSET_64private static intMAX_OFFSET_32-
Fields inherited from class org.eclipse.jgit.internal.storage.file.PackIndexWriter
entries, out, packChecksum, tmp, TOC
-
-
Constructor Summary
Constructors Constructor Description PackIndexWriterV2(java.io.OutputStream dst)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidwriteCRCs()protected voidwriteImpl()Writes the index file toPackIndexWriter.out.private voidwriteObjectNames()private voidwriteOffset32()private voidwriteOffset64()-
Methods inherited from class org.eclipse.jgit.internal.storage.file.PackIndexWriter
createOldestPossible, createVersion, oldestPossibleFormat, write, writeChecksumFooter, writeFanOutTable, writeTOC
-
-
-
-
Field Detail
-
MAX_OFFSET_32
private static final int MAX_OFFSET_32
- See Also:
- Constant Field Values
-
IS_OFFSET_64
private static final int IS_OFFSET_64
- See Also:
- Constant Field Values
-
-
Method Detail
-
writeImpl
protected void writeImpl() throws java.io.IOExceptionWrites the index file toPackIndexWriter.out.Implementations should go something like:
writeFanOutTable(); for (final PackedObjectInfo po : entries) writeOneEntry(po); writeChecksumFooter();Where the logic for
writeOneEntryis specific to the index format in use. Additional headers/footers may be used if necessary and thePackIndexWriter.entriescollection may be iterated over more than once if necessary. Implementors therefore have complete control over the data.- Specified by:
writeImplin classPackIndexWriter- Throws:
java.io.IOException- an error occurred while writing to the output stream, or this index format cannot store the object data supplied.
-
writeObjectNames
private void writeObjectNames() throws java.io.IOException- Throws:
java.io.IOException
-
writeCRCs
private void writeCRCs() throws java.io.IOException- Throws:
java.io.IOException
-
writeOffset32
private void writeOffset32() throws java.io.IOException- Throws:
java.io.IOException
-
writeOffset64
private void writeOffset64() throws java.io.IOException- Throws:
java.io.IOException
-
-