Class BaseFormat

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static java.lang.String COMPRESSION_LEVEL
      Compression-level for the archive file.
    • Constructor Summary

      Constructors 
      Constructor Description
      BaseFormat()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected org.apache.commons.compress.archivers.ArchiveOutputStream applyFormatOptions​(org.apache.commons.compress.archivers.ArchiveOutputStream s, java.util.Map<java.lang.String,​java.lang.Object> o)
      Apply options to archive output stream
      protected int getCompressionLevel​(java.util.Map<java.lang.String,​java.lang.Object> o)
      Removes and returns the COMPRESSION_LEVEL key from the input map parameter if it exists, or -1 if this key does not exist.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • COMPRESSION_LEVEL

        protected static final java.lang.String COMPRESSION_LEVEL
        Compression-level for the archive file. Only values in [0-9] are allowed.
        Since:
        5.11
        See Also:
        Constant Field Values
    • Constructor Detail

      • BaseFormat

        public BaseFormat()
    • Method Detail

      • applyFormatOptions

        protected org.apache.commons.compress.archivers.ArchiveOutputStream applyFormatOptions​(org.apache.commons.compress.archivers.ArchiveOutputStream s,
                                                                                               java.util.Map<java.lang.String,​java.lang.Object> o)
                                                                                        throws java.io.IOException
        Apply options to archive output stream
        Parameters:
        s - stream to apply options to
        o - options map
        Returns:
        stream with option applied
        Throws:
        java.io.IOException
      • getCompressionLevel

        protected int getCompressionLevel​(java.util.Map<java.lang.String,​java.lang.Object> o)
        Removes and returns the COMPRESSION_LEVEL key from the input map parameter if it exists, or -1 if this key does not exist.
        Parameters:
        o - options map
        Returns:
        The compression level if it exists in the map, or -1 instead.
        Throws:
        java.lang.IllegalArgumentException - if the COMPRESSION_LEVEL option does not parse to an Integer.
        Since:
        5.11