类 CompressionAlgorithm
- java.lang.Object
-
- com.mysql.cj.protocol.x.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(String name, String inputStreamClassFqn, String outputStreamClassFqn)
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 StringgetAlgorithmIdentifier()Gets this algorithm's identifier.CompressionModegetCompressionMode()Gets this algorithm's compression mode.static Map<String,CompressionAlgorithm>getDefaultInstances()Returns a list of the compression algorithms supported natively.Class<?>getInputStreamClass()Gets this algorithm'sInputStreamimplementation class that can be used to inflate data.static StringgetNormalizedAlgorithmName(String name)Returns the normalized compression algorithm identifier.Class<?>getOutputStreamClass()Gets this algorithm'sOutputStreamimplementation class that can be used to deflate data.
-
-
-
方法详细资料
-
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
nameis 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.
-
getCompressionMode
public CompressionMode getCompressionMode()
Gets this algorithm's compression mode.- 返回:
- an algorithm
CompressionMode
-
getInputStreamClass
public Class<?> getInputStreamClass()
Gets this algorithm'sInputStreamimplementation class that can be used to inflate data.- 返回:
- an
InputStreamthat knows how to inflate data.
-
getOutputStreamClass
public Class<?> getOutputStreamClass()
Gets this algorithm'sOutputStreamimplementation class that can be used to deflate data.- 返回:
- an
OutputStreamthat knows how to deflate data.
-
-