home *** CD-ROM | disk | FTP | other *** search
/ S283 Planetary Science &n…he Search for Life DVD 2 / DVD-ROM.iso / install / jre1_3 / lib / rt.jar / java / util / zip / ZipFile$1.class (.txt) < prev    next >
Encoding:
Java Class File  |  1979-12-31  |  1.2 KB  |  47 lines

  1. package java.util.zip;
  2.  
  3. import java.io.EOFException;
  4. import java.io.IOException;
  5. import java.io.InputStream;
  6.  
  7. class ZipFile$1 extends InflaterInputStream {
  8.    private boolean isClosed;
  9.    private boolean eof;
  10.    // $FF: synthetic field
  11.    private final ZipFile this$0;
  12.  
  13.    ZipFile$1(ZipFile var1, InputStream var2, Inflater var3) {
  14.       super(var2, var3);
  15.       this.this$0 = var1;
  16.       this.isClosed = false;
  17.    }
  18.  
  19.    public void close() throws IOException {
  20.       if (!this.isClosed) {
  21.          ZipFile.access$000(this.this$0, super.inf);
  22.          super.in.close();
  23.          this.isClosed = true;
  24.       }
  25.  
  26.    }
  27.  
  28.    protected void fill() throws IOException {
  29.       if (this.eof) {
  30.          throw new EOFException("Unexpected end of ZLIB input stream");
  31.       } else {
  32.          super.len = super.in.read(super.buf, 0, super.buf.length);
  33.          if (super.len == -1) {
  34.             super.buf[0] = 0;
  35.             super.len = 1;
  36.             this.eof = true;
  37.          }
  38.  
  39.          super.inf.setInput(super.buf, 0, super.len);
  40.       }
  41.    }
  42.  
  43.    public int available() throws IOException {
  44.       return super.available() != 0 ? super.in.available() : 0;
  45.    }
  46. }
  47.