home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 1999 April / DPPCPRO0499.ISO / April / Notes / 50b2wic.exe / DATA1.CAB / NotesProgramFilesJavaSupport / rt.jar / java / util / zip / Inflater.class (.txt) < prev    next >
Encoding:
Java Class File  |  1998-04-23  |  1.5 KB  |  84 lines

  1. package java.util.zip;
  2.  
  3. public class Inflater {
  4.    private int strm;
  5.    private byte[] buf;
  6.    private int off;
  7.    private int len;
  8.    private boolean finished;
  9.    private boolean needsDictionary;
  10.  
  11.    public Inflater(boolean var1) {
  12.       this.buf = new byte[0];
  13.       this.init(var1);
  14.    }
  15.  
  16.    public Inflater() {
  17.       this(false);
  18.    }
  19.  
  20.    public synchronized void setInput(byte[] var1, int var2, int var3) {
  21.       if (var1 == null) {
  22.          throw new NullPointerException();
  23.       } else if (var2 >= 0 && var3 >= 0 && var2 + var3 <= var1.length) {
  24.          this.buf = var1;
  25.          this.off = var2;
  26.          this.len = var3;
  27.       } else {
  28.          throw new ArrayIndexOutOfBoundsException();
  29.       }
  30.    }
  31.  
  32.    public void setInput(byte[] var1) {
  33.       this.setInput(var1, 0, var1.length);
  34.    }
  35.  
  36.    public synchronized native void setDictionary(byte[] var1, int var2, int var3);
  37.  
  38.    public void setDictionary(byte[] var1) {
  39.       this.setDictionary(var1, 0, var1.length);
  40.    }
  41.  
  42.    public synchronized int getRemaining() {
  43.       return this.len;
  44.    }
  45.  
  46.    public synchronized boolean needsInput() {
  47.       return this.len <= 0;
  48.    }
  49.  
  50.    public synchronized boolean needsDictionary() {
  51.       return this.needsDictionary;
  52.    }
  53.  
  54.    public synchronized boolean finished() {
  55.       return this.finished;
  56.    }
  57.  
  58.    public synchronized native int inflate(byte[] var1, int var2, int var3) throws DataFormatException;
  59.  
  60.    public int inflate(byte[] var1) throws DataFormatException {
  61.       return this.inflate(var1, 0, var1.length);
  62.    }
  63.  
  64.    public synchronized native int getAdler();
  65.  
  66.    public synchronized native int getTotalIn();
  67.  
  68.    public synchronized native int getTotalOut();
  69.  
  70.    public synchronized native void reset();
  71.  
  72.    public synchronized native void end();
  73.  
  74.    protected void finalize() {
  75.       this.end();
  76.    }
  77.  
  78.    private native void init(boolean var1);
  79.  
  80.    static {
  81.       System.loadLibrary("zip");
  82.    }
  83. }
  84.