/** * Create an index file to match the pack file just written. * <p> * Called after * {@link #writePack(ProgressMonitor, ProgressMonitor, OutputStream)}. * <p> * Writing an index is only required for local pack storage. Packs sent on * the network do not need to create an index. * * @param indexStream * output for the index data. Caller is responsible for closing * this stream. * @throws java.io.IOException * the index data could not be written to the supplied stream. */ public void writeIndex(OutputStream indexStream) throws IOException { if (isIndexDisabled()) throw new IOException(JGitText.get().cachedPacksPreventsIndexCreation); long writeStart = System.currentTimeMillis(); final PackIndexWriter iw = PackIndexWriter.createVersion( indexStream, getIndexVersion()); iw.write(sortByName(), packcsum); stats.timeWriting += System.currentTimeMillis() - writeStart; }
final PackOutputStream out = new PackOutputStream( writeMonitor, isIndexDisabled() ? packStream : new CheckedOutputStream(packStream, crc32),
/** * Create an index file to match the pack file just written. * <p> * Called after * {@link #writePack(ProgressMonitor, ProgressMonitor, OutputStream)}. * <p> * Writing an index is only required for local pack storage. Packs sent on * the network do not need to create an index. * * @param indexStream * output for the index data. Caller is responsible for closing * this stream. * @throws java.io.IOException * the index data could not be written to the supplied stream. */ public void writeIndex(OutputStream indexStream) throws IOException { if (isIndexDisabled()) throw new IOException(JGitText.get().cachedPacksPreventsIndexCreation); long writeStart = System.currentTimeMillis(); final PackIndexWriter iw = PackIndexWriter.createVersion( indexStream, getIndexVersion()); iw.write(sortByName(), packcsum); stats.timeWriting += System.currentTimeMillis() - writeStart; }
/** * Create an index file to match the pack file just written. * <p> * Called after * {@link #writePack(ProgressMonitor, ProgressMonitor, OutputStream)}. * <p> * Writing an index is only required for local pack storage. Packs sent on * the network do not need to create an index. * * @param indexStream * output for the index data. Caller is responsible for closing * this stream. * @throws IOException * the index data could not be written to the supplied stream. */ public void writeIndex(final OutputStream indexStream) throws IOException { if (isIndexDisabled()) throw new IOException(JGitText.get().cachedPacksPreventsIndexCreation); long writeStart = System.currentTimeMillis(); final PackIndexWriter iw = PackIndexWriter.createVersion( indexStream, getIndexVersion()); iw.write(sortByName(), packcsum); stats.timeWriting += System.currentTimeMillis() - writeStart; }
final PackOutputStream out = new PackOutputStream( writeMonitor, isIndexDisabled() ? packStream : new CheckedOutputStream(packStream, crc32),
final PackOutputStream out = new PackOutputStream( writeMonitor, isIndexDisabled() ? packStream : new CheckedOutputStream(packStream, crc32),