类 CompressionAlgorithm


  • public class CompressionAlgorithm
    extends Object
    Contains all information about a compression algorithm, its name, compression mode and classes that implement the inflating and deflating streams of data.
    • 构造器详细资料

      • CompressionAlgorithm

        public CompressionAlgorithm​(String name,
                                    String inputStreamClassFqn,
                                    String outputStreamClassFqn)
    • 方法详细资料

      • getDefaultInstances

        public static Map<String,​CompressionAlgorithm> getDefaultInstances()
        Returns a list of the compression algorithms supported natively. Additional algorithms can be registered by user.
        返回:
        a list of the compression algorithms supported natively.
      • getNormalizedAlgorithmName

        public static String getNormalizedAlgorithmName​(String name)
        Returns the normalized compression algorithm identifier. A normalized identifier is composed by a compression algorithm name followed by '_' and then the the compression operation mode ("stream" vs "message").
        参数:
        name - the non-normalized compression algorithm identifier.
        返回:
        if name is an already normalized identifier or an unknown alias then the returned value is the same as the input, otherwise the normalized algorithm identifier is returned.
      • getAlgorithmIdentifier

        public String getAlgorithmIdentifier()
        Gets this algorithm's identifier.
        返回:
        an algorithm identifier.
      • getInputStreamClass

        public Class<?> getInputStreamClass()
        Gets this algorithm's InputStream implementation class that can be used to inflate data.
        返回:
        an InputStream that knows how to inflate data.
      • getOutputStreamClass

        public Class<?> getOutputStreamClass()
        Gets this algorithm's OutputStream implementation class that can be used to deflate data.
        返回:
        an OutputStream that knows how to deflate data.