Top Description Fields Constructors Methods
org.eclipse.jgit.internal.storage.file

pack-priv Class PackIndexWriterV2

extends BasePackIndexWriter
Class Inheritance
Imports
java.io.IOException, .OutputStream, org.eclipse.jgit.transport.PackedObjectInfo, org.eclipse.jgit.util.NB

Creates the version 2 pack table of contents files.
See Also
BasePackIndexWriter, PackIndexV2

Field Summary

Modifier and TypeField and Description
private static final int
private static final int
Inherited from org.eclipse.jgit.internal.storage.file.BasePackIndexWriter:
entriesoutpackChecksumtmpTOC

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
private void
protected void
private void
private void
private void
Inherited from org.eclipse.jgit.internal.storage.file.BasePackIndexWriter:
createOldestPossiblecreateVersionoldestPossibleFormatwritewriteChecksumFooterwriteFanOutTablewriteTOC

Field Detail

IS_OFFSET_64back to summary
private static final int IS_OFFSET_64
MAX_OFFSET_32back to summary
private static final int MAX_OFFSET_32

Constructor Detail

PackIndexWriterV2back to summary
pack-priv PackIndexWriterV2(final OutputStream dst)

Method Detail

writeCRCsback to summary
private void writeCRCs() throws IOException
writeImplback to summary
protected void writeImpl() throws IOException

Implements abstract org.eclipse.jgit.internal.storage.file.BasePackIndexWriter.writeImpl.

Doc from org.eclipse.jgit.internal.storage.file.BasePackIndexWriter.writeImpl.

Writes the index file to 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 entries collection may be iterated over more than once if necessary. Implementors therefore have complete control over the data.

Annotations
@Override
Exceptions
IOException:
an error occurred while writing to the output stream, or this index format cannot store the object data supplied.
writeObjectNamesback to summary
private void writeObjectNames() throws IOException
writeOffset32back to summary
private void writeOffset32() throws IOException
writeOffset64back to summary
private void writeOffset64() throws IOException