Interface ExportSection
- All Known Subinterfaces:
- ExportContext
public interface ExportSection
Allows addition of entries to the export archive, either from disk or directly from a 
stream.- Since:
- 5.13
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddEntriesAsArchive(Path entryName, IoConsumer<SequentialArchive> writer, boolean compress) Adds entries packaged as an archive to the export archivevoidaddEntry(Path entryName, IoConsumer<OutputStream> writer, boolean compress) Creates a file with the givenentryNameunder thissectionof the export archive, then consumes theOutputStreamit obtains from the file, using the givenConsumerstatic IoConsumer<SequentialArchive> Returns a consumer forSequentialArchivethat adds no entries to the archive.static IoConsumer<OutputStream> Returns a consumer forOutputStreamthat does not write any data.
- 
Method Details- 
emptyArchiveReturns a consumer forSequentialArchivethat adds no entries to the archive.- Returns:
- a consumer that adds no entries
 
- 
emptyEntryReturns a consumer forOutputStreamthat does not write any data.- Returns:
- a consumer that does not write any data
 
- 
addEntriesAsArchivevoid addEntriesAsArchive(@Nonnull Path entryName, @Nonnull IoConsumer<SequentialArchive> writer, boolean compress) Adds entries packaged as an archive to the export archive- Parameters:
- entryName- the name to give this entry
- writer- used to write the contents of the entry (as an archive file)
- compress- whether to compress the contents of the entry
- Throws:
- com.atlassian.bitbucket.migration.ExportException- when an unrecoverable exception occurs when writing to the archive
 
- 
addEntryCreates a file with the givenentryNameunder thissectionof the export archive, then consumes theOutputStreamit obtains from the file, using the givenConsumer- Parameters:
- entryName- the entryName of the file to be created. Use- Paths.get(String, String...)to use this method efficiently.
- writer-- consumesthe- OutputStreamto add an entry to the archive
- compress- whether to compress the entry when adding it to the archive
- Throws:
- com.atlassian.bitbucket.migration.ExportException- when an unrecoverable exception occurs when writing to the archive
 
 
-