Class Zipper.ZipperBuilder

java.lang.Object
io.github.astrapi69.zip.Zipper.ZipperBuilder
Enclosing class:
Zipper

public static class Zipper.ZipperBuilder extends Object
Builder class for constructing Zipper objects with desired parameters.
  • Method Details

    • build

      public Zipper build()
      Builds a new Zipper object with the configured parameters.
      Returns:
      a new Zipper instance
    • compressionMethod

      public Zipper.ZipperBuilder compressionMethod(int compressionMethod)
      Sets the compression method for the ZIP archive being created.
      Parameters:
      compressionMethod - the compression method
      Returns:
      this builder instance for method chaining
    • directoryToZip

      public Zipper.ZipperBuilder directoryToZip(File directoryToZip)
      Sets the directory to be zipped.
      Parameters:
      directoryToZip - the directory to zip
      Returns:
      this builder instance for method chaining
    • dirToStart

      public Zipper.ZipperBuilder dirToStart(String dirToStart)
      Sets the starting directory within the ZIP archive.
      Parameters:
      dirToStart - the directory to start zipping
      Returns:
      this builder instance for method chaining
    • fileCounter

      public Zipper.ZipperBuilder fileCounter(int 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

      public Zipper.ZipperBuilder fileFilter(FilenameFilter fileFilter)
      Sets the filename filter used during zipping.
      Parameters:
      fileFilter - the file name filter
      Returns:
      this builder instance for method chaining
    • fileLength

      public Zipper.ZipperBuilder fileLength(long fileLength)
      Sets the total length of files being zipped.
      Parameters:
      fileLength - the total file length
      Returns:
      this builder instance for method chaining
    • zipFile

      public Zipper.ZipperBuilder zipFile(File zipFile)
      Sets the target ZIP file object.
      Parameters:
      zipFile - the zip file
      Returns:
      this builder instance for method chaining
    • zipFileComment

      public Zipper.ZipperBuilder zipFileComment(String zipFileComment)
      Sets the comment associated with the ZIP file.
      Parameters:
      zipFileComment - the zip file comment
      Returns:
      this builder instance for method chaining
    • zipFileName

      public Zipper.ZipperBuilder zipFileName(String zipFileName)
      Sets the name of the ZIP file.
      Parameters:
      zipFileName - the zip file name
      Returns:
      this builder instance for method chaining
    • zipFileObj

      public Zipper.ZipperBuilder zipFileObj(ZipFile zipFileObj)
      Sets the ZIP file object.
      Parameters:
      zipFileObj - the zip file object
      Returns:
      this builder instance for method chaining
    • zipLevel

      public Zipper.ZipperBuilder zipLevel(int zipLevel)
      Sets the compression level used during zipping.
      Parameters:
      zipLevel - the compression level
      Returns:
      this builder instance for method chaining