com.jcraft.jzlib
Class DeflaterOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.FilterOutputStream
          extended by com.jcraft.jzlib.DeflaterOutputStream
All Implemented Interfaces:
Closeable, Flushable
Direct Known Subclasses:
GZIPOutputStream

public class DeflaterOutputStream
extends FilterOutputStream


Field Summary
protected  byte[] buffer
           
protected static int DEFAULT_BUFSIZE
           
protected  Deflater deflater
           
protected  boolean mydeflater
           
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
DeflaterOutputStream(OutputStream out)
           
DeflaterOutputStream(OutputStream out, Deflater def)
           
DeflaterOutputStream(OutputStream out, Deflater deflater, int size)
           
DeflaterOutputStream(OutputStream out, Deflater deflater, int size, boolean close_out)
           
 
Method Summary
 void close()
           
protected  int deflate(int flush)
           
 void finish()
           
 void flush()
           
 Deflater getDeflater()
           
 boolean getSyncFlush()
           
 long getTotalIn()
           
 long getTotalOut()
           
 void setSyncFlush(boolean syncFlush)
           
 void write(byte[] b, int off, int len)
           
 void write(int b)
           
 
Methods inherited from class java.io.FilterOutputStream
write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

deflater

protected final Deflater deflater

buffer

protected byte[] buffer

mydeflater

protected boolean mydeflater

DEFAULT_BUFSIZE

protected static final int DEFAULT_BUFSIZE
See Also:
Constant Field Values
Constructor Detail

DeflaterOutputStream

public DeflaterOutputStream(OutputStream out)
                     throws IOException
Throws:
IOException

DeflaterOutputStream

public DeflaterOutputStream(OutputStream out,
                            Deflater def)
                     throws IOException
Throws:
IOException

DeflaterOutputStream

public DeflaterOutputStream(OutputStream out,
                            Deflater deflater,
                            int size)
                     throws IOException
Throws:
IOException

DeflaterOutputStream

public DeflaterOutputStream(OutputStream out,
                            Deflater deflater,
                            int size,
                            boolean close_out)
                     throws IOException
Throws:
IOException
Method Detail

write

public void write(int b)
           throws IOException
Overrides:
write in class FilterOutputStream
Throws:
IOException

write

public void write(byte[] b,
                  int off,
                  int len)
           throws IOException
Overrides:
write in class FilterOutputStream
Throws:
IOException

finish

public void finish()
            throws IOException
Throws:
IOException

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Overrides:
close in class FilterOutputStream
Throws:
IOException

deflate

protected int deflate(int flush)
               throws IOException
Throws:
IOException

flush

public void flush()
           throws IOException
Specified by:
flush in interface Flushable
Overrides:
flush in class FilterOutputStream
Throws:
IOException

getTotalIn

public long getTotalIn()

getTotalOut

public long getTotalOut()

setSyncFlush

public void setSyncFlush(boolean syncFlush)

getSyncFlush

public boolean getSyncFlush()

getDeflater

public Deflater getDeflater()


Copyright © 2015 Perforce Software. All Rights Reserved.