class PackIndexWriterV2 extends PackIndexWriter
PackIndexWriter
,
PackIndexV2
Modifier and Type | Field and Description |
---|---|
private static int |
IS_OFFSET_64 |
private static int |
MAX_OFFSET_32 |
entries, out, packChecksum, tmp, TOC
Constructor and Description |
---|
PackIndexWriterV2(java.io.OutputStream dst) |
Modifier and Type | Method and Description |
---|---|
private void |
writeCRCs() |
protected void |
writeImpl()
Writes the index file to
PackIndexWriter.out . |
private void |
writeObjectNames() |
private void |
writeOffset32() |
private void |
writeOffset64() |
createOldestPossible, createVersion, oldestPossibleFormat, write, writeChecksumFooter, writeFanOutTable, writeTOC
private static final int MAX_OFFSET_32
private static final int IS_OFFSET_64
protected void writeImpl() throws java.io.IOException
PackIndexWriter.out
.
Implementations should go something like:
writeFanOutTable(); for (final PackedObjectInfo po : entries) writeOneEntry(po); writeChecksumFooter();
Where the logic for writeOneEntry
is specific to the index
format in use. Additional headers/footers may be used if necessary and
the PackIndexWriter.entries
collection may be iterated over more than once if
necessary. Implementors therefore have complete control over the data.
writeImpl
in class PackIndexWriter
java.io.IOException
- an error occurred while writing to the output stream, or this
index format cannot store the object data supplied.private void writeObjectNames() throws java.io.IOException
java.io.IOException
private void writeCRCs() throws java.io.IOException
java.io.IOException
private void writeOffset32() throws java.io.IOException
java.io.IOException
private void writeOffset64() throws java.io.IOException
java.io.IOException