com.jcraft.jzlib
Class ZOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by com.jcraft.jzlib.ZOutputStream
All Implemented Interfaces:
Closeable, Flushable

public class ZOutputStream
extends OutputStream


Field Summary
protected  byte[] buf
           
protected  byte[] buf1
           
protected  int bufsize
           
protected  boolean compress
           
protected  int flush
           
protected  OutputStream out
           
protected  ZStream z
           
 
Constructor Summary
ZOutputStream(OutputStream out)
           
ZOutputStream(OutputStream out, int level)
           
ZOutputStream(OutputStream out, int level, boolean nowrap)
           
 
Method Summary
 void close()
           
 void end()
           
 void finish()
           
 void flush()
           
 int getFlushMode()
           
 long getTotalIn()
          Returns the total number of bytes input so far.
 long getTotalOut()
          Returns the total number of bytes output so far.
 void setFlushMode(int flush)
           
 void write(byte[] b, int off, int len)
           
 void write(int b)
           
 
Methods inherited from class java.io.OutputStream
write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

z

protected ZStream z

bufsize

protected int bufsize

flush

protected int flush

buf

protected byte[] buf

buf1

protected byte[] buf1

compress

protected boolean compress

out

protected OutputStream out
Constructor Detail

ZOutputStream

public ZOutputStream(OutputStream out)

ZOutputStream

public ZOutputStream(OutputStream out,
                     int level)

ZOutputStream

public ZOutputStream(OutputStream out,
                     int level,
                     boolean nowrap)
Method Detail

write

public void write(int b)
           throws IOException
Specified by:
write in class OutputStream
Throws:
IOException

write

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

getFlushMode

public int getFlushMode()

setFlushMode

public void setFlushMode(int flush)

finish

public void finish()
            throws IOException
Throws:
IOException

end

public void end()

close

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

getTotalIn

public long getTotalIn()
Returns the total number of bytes input so far.


getTotalOut

public long getTotalOut()
Returns the total number of bytes output so far.


flush

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


Copyright © 2011 Perforce Software. All Rights Reserved.