/[classpath]/classpath/java/util/zip/GZIPInputStream.java
ViewVC logotype

Diff of /classpath/java/util/zip/GZIPInputStream.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.10 by mkoch, Wed Oct 20 08:08:52 2004 UTC revision 1.11 by mkoch, Fri Oct 22 18:02:06 2004 UTC
# Line 198  public class GZIPInputStream Line 198  public class GZIPInputStream
198        eos = true;        eos = true;
199        return;        return;
200      }      }
201        int magic2 = in.read();
202        if ((magic + (magic2 << 8)) != GZIP_MAGIC)
203          throw new IOException("Error in GZIP header, bad magic code");
204      headCRC.update(magic);      headCRC.update(magic);
205      if (magic != (GZIP_MAGIC & 0xff))      headCRC.update(magic2);
       throw new IOException("Error in GZIP header, second byte doesn't match");  
       
     magic = in.read();  
     if (magic != (GZIP_MAGIC >> 8))  
       throw new IOException("Error in GZIP header, first byte doesn't match");  
     headCRC.update(magic);  
206            
207      /* 2. Check the compression type (must be 8) */      /* 2. Check the compression type (must be 8) */
208      int CM = in.read();      int CM = in.read();

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26