Package io.github.astrapi69.zip
Class Zipper.ZipperBuilder
java.lang.Object
io.github.astrapi69.zip.Zipper.ZipperBuilder
- Enclosing class:
- Zipper
Builder class for constructing
Zipper
objects with desired parameters.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds a newZipper
object with the configured parameters.compressionMethod
(int compressionMethod) Sets the compression method for the ZIP archive being created.directoryToZip
(File directoryToZip) Sets the directory to be zipped.dirToStart
(String dirToStart) Sets the starting directory within the ZIP archive.fileCounter
(int fileCounter) Sets the file counter for tracking the number of files zipped.fileFilter
(FilenameFilter fileFilter) Sets the filename filter used during zipping.fileLength
(long fileLength) Sets the total length of files being zipped.Sets the target ZIP file object.zipFileComment
(String zipFileComment) Sets the comment associated with the ZIP file.zipFileName
(String zipFileName) Sets the name of the ZIP file.zipFileObj
(ZipFile zipFileObj) Sets the ZIP file object.zipLevel
(int zipLevel) Sets the compression level used during zipping.
-
Method Details
-
build
Builds a newZipper
object with the configured parameters.- Returns:
- a new
Zipper
instance
-
compressionMethod
Sets the compression method for the ZIP archive being created.- Parameters:
compressionMethod
- the compression method- Returns:
- this builder instance for method chaining
-
directoryToZip
Sets the directory to be zipped.- Parameters:
directoryToZip
- the directory to zip- Returns:
- this builder instance for method chaining
-
dirToStart
Sets the starting directory within the ZIP archive.- Parameters:
dirToStart
- the directory to start zipping- Returns:
- this builder instance for method chaining
-
fileCounter
Sets the file counter for tracking the number of files zipped.- Parameters:
fileCounter
- the file counter- Returns:
- this builder instance for method chaining
-
fileFilter
Sets the filename filter used during zipping.- Parameters:
fileFilter
- the file name filter- Returns:
- this builder instance for method chaining
-
fileLength
Sets the total length of files being zipped.- Parameters:
fileLength
- the total file length- Returns:
- this builder instance for method chaining
-
zipFile
Sets the target ZIP file object.- Parameters:
zipFile
- the zip file- Returns:
- this builder instance for method chaining
-
zipFileComment
Sets the comment associated with the ZIP file.- Parameters:
zipFileComment
- the zip file comment- Returns:
- this builder instance for method chaining
-
zipFileName
Sets the name of the ZIP file.- Parameters:
zipFileName
- the zip file name- Returns:
- this builder instance for method chaining
-
zipFileObj
Sets the ZIP file object.- Parameters:
zipFileObj
- the zip file object- Returns:
- this builder instance for method chaining
-
zipLevel
Sets the compression level used during zipping.- Parameters:
zipLevel
- the compression level- Returns:
- this builder instance for method chaining
-