Class DeflaterOutputStream

  • All Implemented Interfaces:
    java.io.Closeable, java.io.Flushable, java.lang.AutoCloseable
    Direct Known Subclasses:
    GZIPOutputStream

    public class DeflaterOutputStream
    extends java.io.FilterOutputStream
    • Field Detail

      • deflater

        protected final Deflater deflater
      • buffer

        protected byte[] buffer
      • mydeflater

        protected boolean mydeflater
    • Constructor Detail

      • DeflaterOutputStream

        public DeflaterOutputStream​(java.io.OutputStream out)
                             throws java.io.IOException
        Throws:
        java.io.IOException
      • DeflaterOutputStream

        public DeflaterOutputStream​(java.io.OutputStream out,
                                    Deflater def)
                             throws java.io.IOException
        Throws:
        java.io.IOException
      • DeflaterOutputStream

        public DeflaterOutputStream​(java.io.OutputStream out,
                                    Deflater deflater,
                                    int size)
                             throws java.io.IOException
        Throws:
        java.io.IOException
      • DeflaterOutputStream

        public DeflaterOutputStream​(java.io.OutputStream out,
                                    Deflater deflater,
                                    int size,
                                    boolean close_out)
                             throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • write

        public void write​(int b)
                   throws java.io.IOException
        Overrides:
        write in class java.io.FilterOutputStream
        Throws:
        java.io.IOException
      • write

        public void write​(byte[] b,
                          int off,
                          int len)
                   throws java.io.IOException
        Overrides:
        write in class java.io.FilterOutputStream
        Throws:
        java.io.IOException
      • finish

        public void finish()
                    throws java.io.IOException
        Throws:
        java.io.IOException
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Overrides:
        close in class java.io.FilterOutputStream
        Throws:
        java.io.IOException
      • deflate

        protected int deflate​(int flush)
                       throws java.io.IOException
        Throws:
        java.io.IOException
      • flush

        public void flush()
                   throws java.io.IOException
        Specified by:
        flush in interface java.io.Flushable
        Overrides:
        flush in class java.io.FilterOutputStream
        Throws:
        java.io.IOException
      • getTotalIn

        public long getTotalIn()
      • getTotalOut

        public long getTotalOut()
      • setSyncFlush

        public void setSyncFlush​(boolean syncFlush)
      • getSyncFlush

        public boolean getSyncFlush()
      • getDeflater

        public Deflater getDeflater()