类 CompressorStreamsFactory


  • public class CompressorStreamsFactory
    extends Object
    Factory class for producing inflating and deflating-able InputStream and OutputStream instances for a selected compression algorithm.
    • 构造器详细资料

    • 方法详细资料

      • areCompressedStreamsContinuous

        public boolean areCompressedStreamsContinuous()
      • getInputStreamInstance

        public InputStream getInputStreamInstance​(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. If the compression algorithm operates in steam mode (continuous) then create and reuse one single instance of the compressor InputStream, else create a new instance every time.
        参数:
        in - the InputStream to use as source of the bytes to inflate.
        返回:
        the new inflater InputStream wrapper instance.
      • getOutputStreamInstance

        public OutputStream getOutputStreamInstance​(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. If the compression algorithm operates in steam mode (continuous) then create and reuse one single instance of the compressor OutputStream, else create a new instance every time.
        参数:
        out - the OutputStream to use as target of the bytes to deflate.
        返回:
        the new deflater OutputStream wrapper instance.