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

pack-priv Class PackIndexWriterV1

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

Creates the version 1 (old style) pack table of contents files.
See Also
BasePackIndexWriter, PackIndexV1

Field Summary

Inherited from org.eclipse.jgit.internal.storage.file.BasePackIndexWriter:
entriesoutpackChecksumtmpTOC

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv static boolean
protected void
Inherited from org.eclipse.jgit.internal.storage.file.BasePackIndexWriter:
createOldestPossiblecreateVersionoldestPossibleFormatwritewriteChecksumFooterwriteFanOutTablewriteTOC

Constructor Detail

PackIndexWriterV1back to summary
pack-priv PackIndexWriterV1(final OutputStream dst)

Method Detail

canStoreback to summary
pack-priv static boolean canStore(PackedObjectInfo oe)
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.