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
    boolean areCompressedStreamsReusable()  
    CompressionMode getCompressionMode()  
    java.io.InputStream getInputStreamInstance​(java.io.InputStream in)
    Creates an instance of an InputStream that wraps around the given InputStream and knows how to inflate data using the algorithm given in this class' constructor.
    java.io.OutputStream getOutputStreamInstance​(java.io.OutputStream out)
    Creates an instance of an OutputStream that wraps around the given OutputStream and knows how to deflate data using the algorithm given in this class' constructor.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • getCompressionMode

      public CompressionMode getCompressionMode()
    • areCompressedStreamsReusable

      public boolean areCompressedStreamsReusable()
    • getInputStreamInstance

      public java.io.InputStream getInputStreamInstance​(java.io.InputStream in)
      Creates an instance of an InputStream that wraps around the given InputStream and knows how to inflate data using the algorithm given in this class' constructor.
      Parameters:
      in - the InputStream to use as source of the bytes to inflate.
      Returns:
      the new inflater InputStream wrapper instance.
    • getOutputStreamInstance

      public java.io.OutputStream getOutputStreamInstance​(java.io.OutputStream out)
      Creates an instance of an OutputStream that wraps around the given OutputStream and knows how to deflate data using the algorithm given in this class' constructor.
      Parameters:
      out - the OutputStream to use as target of the bytes to deflate.
      Returns:
      the new deflater OutputStream wrapper instance.