Package com.mysql.cj.protocol.x
Class CompressorStreamsFactory
java.lang.Object
com.mysql.cj.protocol.x.CompressorStreamsFactory
public class CompressorStreamsFactory
extends java.lang.Object
Factory class for producing inflating and deflating-able
InputStream and OutputStream instances for a selected compression algorithm.-
Constructor Summary
Constructors Constructor Description CompressorStreamsFactory(CompressionAlgorithm algorithm) -
Method Summary
Modifier and Type Method Description booleanareCompressedStreamsReusable()CompressionModegetCompressionMode()java.io.InputStreamgetInputStreamInstance(java.io.InputStream in)Creates an instance of anInputStreamthat wraps around the givenInputStreamand knows how to inflate data using the algorithm given in this class' constructor.java.io.OutputStreamgetOutputStreamInstance(java.io.OutputStream out)Creates an instance of anOutputStreamthat wraps around the givenOutputStreamand knows how to deflate data using the algorithm given in this class' constructor.
-
Constructor Details
-
Method Details
-
getCompressionMode
-
areCompressedStreamsReusable
public boolean areCompressedStreamsReusable() -
getInputStreamInstance
public java.io.InputStream getInputStreamInstance(java.io.InputStream in)Creates an instance of anInputStreamthat wraps around the givenInputStreamand knows how to inflate data using the algorithm given in this class' constructor.- Parameters:
in- theInputStreamto use as source of the bytes to inflate.- Returns:
- the new inflater
InputStreamwrapper instance.
-
getOutputStreamInstance
public java.io.OutputStream getOutputStreamInstance(java.io.OutputStream out)Creates an instance of anOutputStreamthat wraps around the givenOutputStreamand knows how to deflate data using the algorithm given in this class' constructor.- Parameters:
out- theOutputStreamto use as target of the bytes to deflate.- Returns:
- the new deflater
OutputStreamwrapper instance.
-