类 CompressorStreamsFactory
- java.lang.Object
-
- com.mysql.cj.protocol.x.CompressorStreamsFactory
-
public class CompressorStreamsFactory extends Object
Factory class for producing inflating and deflating-ableInputStreamandOutputStreaminstances for a selected compression algorithm.
-
-
构造器概要
构造器 构造器 说明 CompressorStreamsFactory(CompressionAlgorithm algorithm)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 booleanareCompressedStreamsContinuous()CompressionModegetCompressionMode()InputStreamgetInputStreamInstance(InputStream in)Creates an instance of anInputStreamthat wraps around the givenInputStreamand knows how to inflate data using the algorithm given in this class' constructor.OutputStreamgetOutputStreamInstance(OutputStream out)Creates an instance of anOutputStreamthat wraps around the givenOutputStreamand knows how to deflate data using the algorithm given in this class' constructor.
-
-
-
构造器详细资料
-
CompressorStreamsFactory
public CompressorStreamsFactory(CompressionAlgorithm algorithm)
-
-
方法详细资料
-
getCompressionMode
public CompressionMode getCompressionMode()
-
areCompressedStreamsContinuous
public boolean areCompressedStreamsContinuous()
-
getInputStreamInstance
public InputStream getInputStreamInstance(InputStream in)
Creates an instance of anInputStreamthat wraps around the givenInputStreamand knows how to inflate data using the algorithm given in this class' constructor. If the compression algorithm operates in steam mode (continuous) then create and reuse one single instance of the compressorInputStream, else create a new instance every time.- 参数:
in- theInputStreamto use as source of the bytes to inflate.- 返回:
- the new inflater
InputStreamwrapper instance.
-
getOutputStreamInstance
public OutputStream getOutputStreamInstance(OutputStream out)
Creates an instance of anOutputStreamthat wraps around the givenOutputStreamand knows how to deflate data using the algorithm given in this class' constructor. If the compression algorithm operates in steam mode (continuous) then create and reuse one single instance of the compressorOutputStream, else create a new instance every time.- 参数:
out- theOutputStreamto use as target of the bytes to deflate.- 返回:
- the new deflater
OutputStreamwrapper instance.
-
-