[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
java.util.zip.GZIPConstants
From: |
Sascha Brawer |
Subject: |
java.util.zip.GZIPConstants |
Date: |
Wed, 20 Mar 2002 20:17:36 +0100 |
Hello,
while reviewing the constant field values in Classpath, I stumbled across
the following situation:
// Classpath
package java.util.zip;
interface GZIPConstants
{
public static final int GZIP_MAGIC = 0x1f8b;
public static final int FTEXT = 0x1;
...
}
public class GZIPInputStream
extends InflaterInputStream
implements GZIPConstants
{
...
}
public class GZIPOutputStream
extends DeflaterOutputStream
implements GZIPConstants
{
...
}
Now, according Sun's J2SE 1.4 Javadoc, one would expect the following:
// Spec
package java.util.zip;
public class GZIPInputStream
extends InflaterInputStream
{
public static final int GZIP_MAGIC = 0x1f8b;
...
}
public class GZIPOutputStream
extends DeflaterOutputStream
{
...
}
Observations:
1. The spec requires GZIPInputStream.GZIP_MAGIC; Classpath inherits the
field from a package-private interface.
2. According to the spec, there should not be a GZIPOutputStream.GZIP_MAGIC.
3. According to the spec, there should not be a FTEXT anywhere.
Are any of these non-conformant?
-- Sascha
- java.util.zip.GZIPConstants,
Sascha Brawer <=