Interface ArchiveWriter
-
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
StreamZipWriter
public interface ArchiveWriter extends AutoCloseable
Represents interface capable of archiving data from the input stream- Since:
- 7.20.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
close()
Locking method that waits for all data to be archived and closes necessary resources.void
compressFromStream(InputStream streamToZip, String pathInZip)
Compresses data from the provided input stream into an archive.void
compressFromStream(InputStream streamToZip, String pathInZip, String comment)
Compresses data from the provided input stream into an archive.void
compressFromStreamSupplier(org.apache.commons.compress.parallel.InputStreamSupplier inputStreamSupplier, String pathInZip)
Compresses data from the provided input stream supplier into an archive.void
compressFromStreamSupplier(org.apache.commons.compress.parallel.InputStreamSupplier inputStreamSupplier, String pathInZip, String comment)
Compresses data from the provided input stream supplier into an archive.
-
-
-
Method Detail
-
compressFromStream
void compressFromStream(InputStream streamToZip, String pathInZip)
Compresses data from the provided input stream into an archive. The input stream will be closed by the ArchiveWriter implementation. Use this method if the streamed data size is unknown when opened.- Parameters:
streamToZip
- - source streampathInZip
- - path in the archive where entry is written to
-
compressFromStream
void compressFromStream(InputStream streamToZip, String pathInZip, String comment)
Compresses data from the provided input stream into an archive. The input stream will be closed by the ArchiveWriter implementation. Use this method if the streamed data size is unknown when opened. You can use the comment param to avoid issue with uniqueness of zip entries (potential crash). See CONFSRVDEV-25060 for more details.- Parameters:
streamToZip
- - source streampathInZip
- - path in the archive where entry is written tocomment
- - additional comment stored with the compressed file- Since:
- 8.1
-
compressFromStreamSupplier
void compressFromStreamSupplier(org.apache.commons.compress.parallel.InputStreamSupplier inputStreamSupplier, String pathInZip)
Compresses data from the provided input stream supplier into an archive. The provided input stream will be closed by the ArchiveWriter implementation. Use this method if all data is available for compression when the stream opens.- Parameters:
inputStreamSupplier
- - source stream supplierpathInZip
- - path in the archive where entry is written to
-
compressFromStreamSupplier
void compressFromStreamSupplier(org.apache.commons.compress.parallel.InputStreamSupplier inputStreamSupplier, String pathInZip, String comment)
Compresses data from the provided input stream supplier into an archive. The provided input stream will be closed by the ArchiveWriter implementation. Use this method if all data is available for compression when the stream opens. You can use the comment param to avoid issue with uniqueness of zip entries (potential crash). See CONFSRVDEV-25060 for more details.- Parameters:
inputStreamSupplier
- - source stream supplierpathInZip
- - path in the archive where entry is written tocomment
- - comment for the compressed file- Since:
- 8.1
-
close
void close() throws BackupRestoreException
Locking method that waits for all data to be archived and closes necessary resources.- Specified by:
close
in interfaceAutoCloseable
- Throws:
BackupRestoreException
- - throws if any exception occurred
-
-