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(); |