This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch: FYI: classpath comparison update
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Subject: Patch: FYI: classpath comparison update
- From: Tom Tromey <tromey at redhat dot com>
- Date: 19 Oct 2001 15:22:31 -0600
- Cc: Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Reply-To: tromey at redhat dot com
I'm checking this in. This is another Classpath comparison. I also
fixed a bug in my previous javax.* exclusion patch.
Tom
Index: libgcj-classpath-compare.html
===================================================================
RCS file: /cvs/gcc/wwwdocs/htdocs/java/libgcj-classpath-compare.html,v
retrieving revision 1.13
diff -u -r1.13 libgcj-classpath-compare.html
--- libgcj-classpath-compare.html 2001/10/16 22:42:15 1.13
+++ libgcj-classpath-compare.html 2001/10/19 21:04:57
@@ -9,7 +9,7 @@
cvs Classpath. It was generated using the <a
href="scripts/gen-classpath-compare"><code>gen-classpath-compare</code></a>
script on
-2001-10-16.
+2001-10-19.
This table intentionally omits certain classes which are not of
interest. If the third column shows a "Diff" link, then that means
the script believes that the class has been merged, but a difference
@@ -124,6 +124,7 @@
<tr> <td>javax.accessibility.AccessibleValue</td> <td bgcolor="#eeeeaa">No</td> <td>Yes</td> <td bgcolor="#eeeeaa">No</td> </tr>
<tr> <td>javax.naming.AuthenticationException</td> <td>Yes</td> <td bgcolor="#eeeeaa">No</td> <td bgcolor="#eeeeaa">No</td> </tr>
<tr> <td>javax.naming.AuthenticationNotSupportedException</td> <td>Yes</td> <td bgcolor="#eeeeaa">No</td> <td bgcolor="#eeeeaa">No</td> </tr>
+<tr> <td>javax.naming.BinaryRefAddr</td> <td>Yes</td> <td bgcolor="#eeeeaa">No</td> <td>Yes</td> </tr>
<tr> <td>javax.naming.CannotProceedException</td> <td>Yes</td> <td bgcolor="#eeeeaa">No</td> <td bgcolor="#eeeeaa">No</td> </tr>
<tr> <td>javax.naming.CommunicationException</td> <td>Yes</td> <td bgcolor="#eeeeaa">No</td> <td bgcolor="#eeeeaa">No</td> </tr>
<tr> <td>javax.naming.ConfigurationException</td> <td>Yes</td> <td bgcolor="#eeeeaa">No</td> <td bgcolor="#eeeeaa">No</td> </tr>
@@ -132,30 +133,30 @@
<tr> <td>javax.naming.InitialContext</td> <td>Yes</td> <td bgcolor="#eeeeaa">No</td> <td bgcolor="#eeeeaa">No</td> </tr>
<tr> <td>javax.naming.InsufficientResourcesException</td> <td>Yes</td> <td bgcolor="#eeeeaa">No</td> <td bgcolor="#eeeeaa">No</td> </tr>
<tr> <td>javax.naming.InterruptedNamingException</td> <td>Yes</td> <td bgcolor="#eeeeaa">No</td> <td bgcolor="#eeeeaa">No</td> </tr>
-<tr> <td>javax.naming.InvalidNameException</td> <td>Yes</td> <td bgcolor="#eeeeaa">No</td> <td bgcolor="#eeeeaa">No</td> </tr>
+<tr> <td>javax.naming.InvalidNameException</td> <td>Yes</td> <td bgcolor="#eeeeaa">No</td> <td>Yes</td> </tr>
<tr> <td>javax.naming.LimitExceededException</td> <td>Yes</td> <td bgcolor="#eeeeaa">No</td> <td bgcolor="#eeeeaa">No</td> </tr>
<tr> <td>javax.naming.LinkException</td> <td>Yes</td> <td bgcolor="#eeeeaa">No</td> <td bgcolor="#eeeeaa">No</td> </tr>
<tr> <td>javax.naming.LinkLoopException</td> <td>Yes</td> <td bgcolor="#eeeeaa">No</td> <td bgcolor="#eeeeaa">No</td> </tr>
<tr> <td>javax.naming.MalformedLinkException</td> <td>Yes</td> <td bgcolor="#eeeeaa">No</td> <td bgcolor="#eeeeaa">No</td> </tr>
-<tr> <td>javax.naming.Name</td> <td>Yes</td> <td bgcolor="#eeeeaa">No</td> <td bgcolor="#eeeeaa">No</td> </tr>
+<tr> <td>javax.naming.Name</td> <td>Yes</td> <td bgcolor="#eeeeaa">No</td> <td>Yes</td> </tr>
<tr> <td>javax.naming.NameAlreadyBoundException</td> <td>Yes</td> <td bgcolor="#eeeeaa">No</td> <td bgcolor="#eeeeaa">No</td> </tr>
<tr> <td>javax.naming.NameNotFoundException</td> <td>Yes</td> <td bgcolor="#eeeeaa">No</td> <td bgcolor="#eeeeaa">No</td> </tr>
<tr> <td>javax.naming.NameParser</td> <td>Yes</td> <td bgcolor="#eeeeaa">No</td> <td bgcolor="#eeeeaa">No</td> </tr>
<tr> <td>javax.naming.NamingEnumeration</td> <td>Yes</td> <td bgcolor="#eeeeaa">No</td> <td bgcolor="#eeeeaa">No</td> </tr>
-<tr> <td>javax.naming.NamingException</td> <td>Yes</td> <td bgcolor="#eeeeaa">No</td> <td bgcolor="#eeeeaa">No</td> </tr>
+<tr> <td>javax.naming.NamingException</td> <td>Yes</td> <td bgcolor="#eeeeaa">No</td> <td>Yes</td> </tr>
<tr> <td>javax.naming.NamingSecurityException</td> <td>Yes</td> <td bgcolor="#eeeeaa">No</td> <td bgcolor="#eeeeaa">No</td> </tr>
<tr> <td>javax.naming.NoInitialContextException</td> <td>Yes</td> <td bgcolor="#eeeeaa">No</td> <td bgcolor="#eeeeaa">No</td> </tr>
<tr> <td>javax.naming.NoPermissionException</td> <td>Yes</td> <td bgcolor="#eeeeaa">No</td> <td bgcolor="#eeeeaa">No</td> </tr>
<tr> <td>javax.naming.NotContextException</td> <td>Yes</td> <td bgcolor="#eeeeaa">No</td> <td bgcolor="#eeeeaa">No</td> </tr>
<tr> <td>javax.naming.OperationNotSupportedException</td> <td>Yes</td> <td bgcolor="#eeeeaa">No</td> <td bgcolor="#eeeeaa">No</td> </tr>
<tr> <td>javax.naming.PartialResultException</td> <td>Yes</td> <td bgcolor="#eeeeaa">No</td> <td bgcolor="#eeeeaa">No</td> </tr>
-<tr> <td>javax.naming.RefAddr</td> <td>Yes</td> <td bgcolor="#eeeeaa">No</td> <td bgcolor="#eeeeaa">No</td> </tr>
+<tr> <td>javax.naming.RefAddr</td> <td>Yes</td> <td bgcolor="#eeeeaa">No</td> <td>Yes</td> </tr>
<tr> <td>javax.naming.Reference</td> <td>Yes</td> <td bgcolor="#eeeeaa">No</td> <td bgcolor="#eeeeaa">No</td> </tr>
<tr> <td>javax.naming.Referenceable</td> <td>Yes</td> <td bgcolor="#eeeeaa">No</td> <td bgcolor="#eeeeaa">No</td> </tr>
<tr> <td>javax.naming.ReferralException</td> <td>Yes</td> <td bgcolor="#eeeeaa">No</td> <td bgcolor="#eeeeaa">No</td> </tr>
<tr> <td>javax.naming.ServiceUnavailableException</td> <td>Yes</td> <td bgcolor="#eeeeaa">No</td> <td bgcolor="#eeeeaa">No</td> </tr>
<tr> <td>javax.naming.SizeLimitExceededException</td> <td>Yes</td> <td bgcolor="#eeeeaa">No</td> <td bgcolor="#eeeeaa">No</td> </tr>
-<tr> <td>javax.naming.StringRefAddr</td> <td>Yes</td> <td bgcolor="#eeeeaa">No</td> <td bgcolor="#eeeeaa">No</td> </tr>
+<tr> <td>javax.naming.StringRefAddr</td> <td>Yes</td> <td bgcolor="#eeeeaa">No</td> <td>Yes</td> </tr>
<tr> <td>javax.naming.TimeLimitExceededException</td> <td>Yes</td> <td bgcolor="#eeeeaa">No</td> <td bgcolor="#eeeeaa">No</td> </tr>
<tr> <td>javax.naming.directory.Attribute</td> <td>Yes</td> <td bgcolor="#eeeeaa">No</td> <td bgcolor="#eeeeaa">No</td> </tr>
<tr> <td>javax.naming.directory.AttributeInUseException</td> <td>Yes</td> <td bgcolor="#eeeeaa">No</td> <td bgcolor="#eeeeaa">No</td> </tr>
Index: compare/java.util.zip.ZipConstants.diff
===================================================================
RCS file: /cvs/gcc/wwwdocs/htdocs/java/compare/java.util.zip.ZipConstants.diff,v
retrieving revision 1.2
diff -u -r1.2 java.util.zip.ZipConstants.diff
--- compare/java.util.zip.ZipConstants.diff 2001/09/26 17:37:44 1.2
+++ compare/java.util.zip.ZipConstants.diff 2001/10/19 21:05:00
@@ -1,4 +1,4 @@
---- /home/tromey/gnu/egcs/classpath/classpath/java/util/zip/ZipConstants.java Wed Sep 26 08:18:48 2001
+--- /home/tromey/gnu/egcs/classpath/classpath/java/util/zip/ZipConstants.java Thu Oct 18 12:05:41 2001
+++ java/util/zip/ZipConstants.java Fri Nov 17 14:42:28 2000
@@ -1,5 +1,5 @@
-/* java.util.zip.ZipConstants
@@ -17,7 +17,7 @@
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-@@ -26,65 +26,19 @@
+@@ -26,61 +26,19 @@
package java.util.zip;
@@ -32,63 +32,59 @@
interface ZipConstants
{
- /* The local file header */
-- public final static int L_SIZE = 30;
-- public final static int L_HDR_SIG = 'P'|('K'<<8)|(3<<16)|(4<<24);
+- public final static int LOCHDR = 30;
+- public final static int LOCSIG = 'P'|('K'<<8)|(3<<16)|(4<<24);
-
-- public final static int L_SIGNATURE = 0;
-- public final static int L_VERSION_NEEDED_TO_EXTRACT = 4;
-- public final static int L_GENERAL_PURPOSE_BIT_FLAG = 6;
-- public final static int L_COMPRESSION_METHOD = 8;
-- public final static int L_LAST_MOD_FILE_TIME = 10;
-- public final static int L_LAST_MOD_FILE_DATE = 12;
-- public final static int L_CRC32 = 14;
-- public final static int L_COMPRESSED_SIZE = 18;
-- public final static int L_UNCOMPRESSED_SIZE = 22;
-- public final static int L_FILENAME_LENGTH = 26;
-- public final static int L_EXTRA_FIELD_LENGTH = 28;
+- public final static int LOCVER = 4;
+- public final static int LOCFLG = 6;
+- public final static int LOCHOW = 8;
+- public final static int LOCTIM = 10;
+- public final static int LOCCRC = 14;
+- public final static int LOCSIZ = 18;
+- public final static int LOCLEN = 22;
+- public final static int LOCNAM = 26;
+- public final static int LOCEXT = 28;
-
- /* The Data descriptor */
-- public final static int D_HDR_SIG = 'P'|('K'<<8)|(7<<16)|(8<<24);
-- public final static int D_SIGNATURE = 0;
-- public final static int D_CRC32 = 4;
-- public final static int D_COMPRESSED_SIZE = 8;
-- public final static int D_UNCOMPRESSED_SIZE = 12;
-- public final static int D_SIZE = 16;
+- public final static int EXTSIG = 'P'|('K'<<8)|(7<<16)|(8<<24);
+- public final static int EXTHDR = 16;
-
+- public final static int EXTCRC = 4;
+- public final static int EXTSIZ = 8;
+- public final static int EXTLEN = 12;
+-
- /* The central directory file header */
-- public final static int C_HDR_SIG = 'P'|('K'<<8)|(1<<16)|(2<<24);
+- public final static int CENSIG = 'P'|('K'<<8)|(1<<16)|(2<<24);
+- public final static int CENHDR = 46;
-
-- public final static int C_SIGNATURE = 0;
-- public final static int C_VERSION_MADE_BY = 4;
-- public final static int C_VERSION_NEEDED_TO_EXTRACT = 6;
-- public final static int C_GENERAL_PURPOSE_BIT_FLAG = 8;
-- public final static int C_COMPRESSION_METHOD = 10;
-- public final static int C_LAST_MOD_FILE_TIME = 12;
-- public final static int C_LAST_MOD_FILE_DATE = 14;
-- public final static int C_CRC32 = 16;
-- public final static int C_COMPRESSED_SIZE = 20;
-- public final static int C_UNCOMPRESSED_SIZE = 24;
-- public final static int C_FILENAME_LENGTH = 28;
-- public final static int C_EXTRA_FIELD_LENGTH = 30;
-- public final static int C_FILE_COMMENT_LENGTH = 32;
-- public final static int C_DISK_NUMBER_START = 34;
-- public final static int C_INTERNAL_FILE_ATTRIBUTES = 36;
-- public final static int C_EXTERNAL_FILE_ATTRIBUTES = 38;
-- public final static int C_RELATIVE_OFFSET_LOCAL_HEADER = 42;
-- public final static int C_SIZE = 46;
+- public final static int CENVEM = 4;
+- public final static int CENVER = 6;
+- public final static int CENFLG = 8;
+- public final static int CENHOW = 10;
+- public final static int CENTIM = 12;
+- public final static int CENCRC = 16;
+- public final static int CENSIZ = 20;
+- public final static int CENLEN = 24;
+- public final static int CENNAM = 28;
+- public final static int CENEXT = 30;
+- public final static int CENCOM = 32;
+- public final static int CENDSK = 34;
+- public final static int CENATT = 36;
+- public final static int CENATX = 38;
+- public final static int CENOFF = 42;
-
- /* The entries in the end of central directory */
-- public final static int EC_HDR_SIG = 'P'|('K'<<8)|(5<<16)|(6<<24);
+- public final static int ENDSIG = 'P'|('K'<<8)|(5<<16)|(6<<24);
+- public final static int ENDHDR = 22;
-
-- public final static int EC_SIGNATURE = 0;
-- public final static int EC_NUMBER_THIS_DISK = 4;
-- public final static int EC_NUM_DISK_WITH_START_CENTRAL_DIR = 6;
-- public final static int EC_NUM_ENTRIES_CENTRL_DIR_THS_DISK = 8;
-- public final static int EC_TOTAL_ENTRIES_CENTRAL_DIR = 10;
-- public final static int EC_SIZE_CENTRAL_DIRECTORY = 12;
-- public final static int EC_OFFSET_START_CENTRAL_DIRECTORY = 16;
-- public final static int EC_ZIPFILE_COMMENT_LENGTH = 20;
-- public final static int EC_SIZE = 22;
+- /* The following two fields are missing in SUN JDK */
+- final static int ENDNRD = 4;
+- final static int ENDDCD = 6;
+- public final static int ENDSUB = 8;
+- public final static int ENDTOT = 10;
+- public final static int ENDSIZ = 12;
+- public final static int ENDOFF = 16;
+- public final static int ENDCOM = 20;
-}
+ // Size in bytes of local file header, including signature.
+ public static final int LOCAL_FILE_HEADER_SIZE = 30;
Index: compare/java.util.zip.ZipEntry.diff
===================================================================
RCS file: /cvs/gcc/wwwdocs/htdocs/java/compare/java.util.zip.ZipEntry.diff,v
retrieving revision 1.2
diff -u -r1.2 java.util.zip.ZipEntry.diff
--- compare/java.util.zip.ZipEntry.diff 2001/09/26 17:37:44 1.2
+++ compare/java.util.zip.ZipEntry.diff 2001/10/19 21:05:01
@@ -1,4 +1,4 @@
---- /home/tromey/gnu/egcs/classpath/classpath/java/util/zip/ZipEntry.java Wed Sep 26 08:18:48 2001
+--- /home/tromey/gnu/egcs/classpath/classpath/java/util/zip/ZipEntry.java Thu Oct 18 12:05:41 2001
+++ java/util/zip/ZipEntry.java Fri Nov 17 14:42:28 2000
@@ -1,5 +1,5 @@
-/* java.util.zip.ZipEntry
@@ -17,7 +17,7 @@
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-@@ -25,347 +25,201 @@
+@@ -25,357 +25,201 @@
executable file might be covered by the GNU General Public License. */
package java.util.zip;
@@ -34,23 +34,9 @@
- * @author Jochen Hoenicke
+ * @author Per Bothner
+ * @date January 6, 1999.
-+ */
-+
-+/*
-+ * Written using on-line Java Platform 1.2 API Specification, as well
-+ * as "The Java Class Libraries", 2nd edition (Addison-Wesley, 1998).
-+ * Status: Believed complete and correct.
-+ */
-+
-+/**
-+ * Represents entries in a zip file archive.
-+ * An Entry cn be created by giving a name or by giving an already existing
-+ * ZipEntries whose values should be copied. The name normally represents a
-+ * file path name or directory name.
*/
-public class ZipEntry implements Cloneable
-+public class ZipEntry implements ZipConstants, Cloneable
- {
+-{
- private static int KNOWN_SIZE = 1;
- private static int KNOWN_CSIZE = 2;
- private static int KNOWN_CRC = 4;
@@ -71,6 +57,29 @@
- int zipFileIndex = -1; /* used by ZipFile */
- int flags; /* used by ZipOutputStream */
- int offset; /* used by ZipFile and ZipOutputStream */
+
++/*
++ * Written using on-line Java Platform 1.2 API Specification, as well
++ * as "The Java Class Libraries", 2nd edition (Addison-Wesley, 1998).
++ * Status: Believed complete and correct.
++ */
+
+- /**
+- * Compression method. This method doesn't compress at all.
+- */
+- public final static int STORED = 0;
+- /**
+- * Compression method. This method uses the Deflater.
+- */
+- public final static int DEFLATED = 8;
++/**
++ * Represents entries in a zip file archive.
++ * An Entry cn be created by giving a name or by giving an already existing
++ * ZipEntries whose values should be copied. The name normally represents a
++ * file path name or directory name.
++ */
++public class ZipEntry implements ZipConstants, Cloneable
++{
+ // These values were determined using a simple test program.
+ public static final int STORED = 0;
+ public static final int DEFLATED = 8;
@@ -115,8 +124,7 @@
+ * @since 1.2
*/
- public ZipEntry(ZipEntry e)
-+ public ZipEntry (ZipEntry ent)
- {
+- {
- name = e.name;
- known = e.known;
- size = e.size;
@@ -156,7 +164,8 @@
- }
-
- int getDOSTime()
-- {
++ public ZipEntry (ZipEntry ent)
+ {
- if ((known & KNOWN_TIME) == 0)
- return 0;
- synchronized (cal)
Index: compare/java.util.zip.ZipFile.diff
===================================================================
RCS file: /cvs/gcc/wwwdocs/htdocs/java/compare/java.util.zip.ZipFile.diff,v
retrieving revision 1.3
diff -u -r1.3 java.util.zip.ZipFile.diff
--- compare/java.util.zip.ZipFile.diff 2001/10/03 13:56:19 1.3
+++ compare/java.util.zip.ZipFile.diff 2001/10/19 21:05:02
@@ -1,4 +1,4 @@
---- /home/tromey/gnu/egcs/classpath/classpath/java/util/zip/ZipFile.java Wed Oct 3 08:00:37 2001
+--- /home/tromey/gnu/egcs/classpath/classpath/java/util/zip/ZipFile.java Thu Oct 18 12:05:41 2001
+++ java/util/zip/ZipFile.java Fri Nov 17 14:42:28 2000
@@ -1,5 +1,5 @@
-/* java.util.zip.ZipFile
@@ -17,7 +17,7 @@
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-@@ -25,419 +25,233 @@
+@@ -25,422 +25,233 @@
executable file might be covered by the GNU General Public License. */
package java.util.zip;
@@ -159,29 +159,36 @@
- */
- private void readEntries() throws ZipException, IOException
- {
-- long fileLen = raf.length();
-- raf.seek(fileLen - EC_SIZE);
-- if (readLeInt() != EC_HDR_SIG)
-- throw new ZipException("Missing End of Central Directory");
-- if (raf.skipBytes(EC_TOTAL_ENTRIES_CENTRAL_DIR - EC_NUMBER_THIS_DISK)
-- != EC_TOTAL_ENTRIES_CENTRAL_DIR - EC_NUMBER_THIS_DISK)
+- /* Search for the End Of Central Directory. When a zip comment is
+- * present the directory may start earlier.
+- * FIXME: This searches the whole file in a very slow manner if the
+- * file isn't a zip file.
+- */
+- long pos = raf.length() - ENDHDR;
+- do
++ else
+ {
+- if (pos < 0)
+- throw new ZipException
+- ("central directory not found, probably not a zip file");
+- raf.seek(pos--);
++ delete_on_close = null;
+ }
+- while (readLeInt() != ENDSIG);
+- if (raf.skipBytes(ENDTOT - ENDNRD) != ENDTOT - ENDNRD)
- throw new EOFException();
- int count = readLeShort();
-- if (raf.skipBytes(EC_OFFSET_START_CENTRAL_DIRECTORY
-- - EC_SIZE_CENTRAL_DIRECTORY)
-- != EC_OFFSET_START_CENTRAL_DIRECTORY - EC_SIZE_CENTRAL_DIRECTORY)
+- if (raf.skipBytes(ENDOFF - ENDSIZ) != ENDOFF - ENDSIZ)
- throw new EOFException();
- int centralOffset = readLeInt();
-
- entries = new ZipEntry[count];
- raf.seek(centralOffset);
- for (int i = 0; i < count; i++)
-+ else
- {
-- if (readLeInt() != C_HDR_SIG)
+- {
+- if (readLeInt() != CENSIG)
- throw new ZipException("Wrong Central Directory signature");
-- if (raf.skipBytes(C_COMPRESSION_METHOD - C_VERSION_MADE_BY)
-- != C_COMPRESSION_METHOD - C_VERSION_MADE_BY)
+- if (raf.skipBytes(CENHOW - CENVEM) != CENHOW - CENVEM)
- throw new EOFException();
- int method = readLeShort();
- int dostime = readLeInt();
@@ -191,8 +198,7 @@
- int nameLen = readLeShort();
- int extraLen = readLeShort();
- int commentLen = readLeShort();
-- if (raf.skipBytes(C_RELATIVE_OFFSET_LOCAL_HEADER - C_DISK_NUMBER_START)
-- != C_RELATIVE_OFFSET_LOCAL_HEADER - C_DISK_NUMBER_START)
+- if (raf.skipBytes(CENOFF - CENDSK) != CENOFF - CENDSK)
- throw new EOFException();
- int offset = readLeInt();
-
@@ -208,8 +214,6 @@
- entry.setCompressedSize(csize & 0xffffffffL);
- entry.setDOSTime(dostime);
- if (extraLen > 0)
-+ delete_on_close = null;
-+ }
+
+ file = new RandomAccessFile(f, "r");
+ name = f.getName();
@@ -396,27 +400,25 @@
- synchronized (raf)
- {
- raf.seek(entry.offset);
-- if (readLeInt() != L_HDR_SIG)
+- if (readLeInt() != LOCSIG)
- throw new ZipException("Wrong Local header signature");
-
- /* skip version and flags */
-- if (raf.skipBytes(L_COMPRESSION_METHOD - L_VERSION_NEEDED_TO_EXTRACT)
-- != L_COMPRESSION_METHOD - L_VERSION_NEEDED_TO_EXTRACT)
+- if (raf.skipBytes(LOCHOW - LOCVER) != LOCHOW - LOCVER)
- throw new EOFException();
-
- if (entry.getMethod() != readLeShort())
- throw new ZipException("Compression method mismatch");
-
- /* Skip time, crc, size and csize */
-- if (raf.skipBytes(L_FILENAME_LENGTH - L_LAST_MOD_FILE_TIME)
-- != L_FILENAME_LENGTH - L_LAST_MOD_FILE_TIME)
+- if (raf.skipBytes(LOCNAM - LOCTIM) != LOCNAM - LOCTIM)
- throw new EOFException();
-
- if (entry.getName().length() != readLeShort())
- throw new ZipException("file name length mismatch");
-
- int extraLen = entry.getName().length() + readLeShort();
-- return entry.offset + L_SIZE + extraLen;
+- return entry.offset + LOCHDR + extraLen;
- }
+ close();
}
Index: compare/java.util.zip.ZipInputStream.diff
===================================================================
RCS file: /cvs/gcc/wwwdocs/htdocs/java/compare/java.util.zip.ZipInputStream.diff,v
retrieving revision 1.2
diff -u -r1.2 java.util.zip.ZipInputStream.diff
--- compare/java.util.zip.ZipInputStream.diff 2001/09/26 17:37:44 1.2
+++ compare/java.util.zip.ZipInputStream.diff 2001/10/19 21:05:02
@@ -1,4 +1,4 @@
---- /home/tromey/gnu/egcs/classpath/classpath/java/util/zip/ZipInputStream.java Wed Sep 26 08:18:48 2001
+--- /home/tromey/gnu/egcs/classpath/classpath/java/util/zip/ZipInputStream.java Thu Oct 18 12:05:41 2001
+++ java/util/zip/ZipInputStream.java Fri Nov 17 14:42:28 2000
@@ -1,5 +1,5 @@
-/* java.util.zip.ZipInputStream
@@ -239,13 +239,13 @@
- closeEntry();
-
- int header = readLeInt();
-- if (header == C_HDR_SIG)
+- if (header == CENSIG)
- {
- /* Central Header reached. */
- close();
- return null;
- }
-- if (header != L_HDR_SIG)
+- if (header != LOCSIG)
- throw new ZipException("Wrong Local header signature" + Integer.toHexString(header));
- /* skip version */
- readLeShort();
@@ -310,7 +310,7 @@
- private void readDataDescr() throws IOException
+ public long skip (long n) throws IOException
{
-- if (readLeInt() != D_HDR_SIG)
+- if (readLeInt() != EXTSIG)
- throw new ZipException("Data descriptor signature not found");
- entry.setCrc(readLeInt() & 0xffffffffL);
- csize = readLeInt();
Index: compare/java.util.zip.ZipOutputStream.diff
===================================================================
RCS file: /cvs/gcc/wwwdocs/htdocs/java/compare/java.util.zip.ZipOutputStream.diff,v
retrieving revision 1.2
diff -u -r1.2 java.util.zip.ZipOutputStream.diff
--- compare/java.util.zip.ZipOutputStream.diff 2001/09/26 17:37:44 1.2
+++ compare/java.util.zip.ZipOutputStream.diff 2001/10/19 21:05:02
@@ -1,4 +1,4 @@
---- /home/tromey/gnu/egcs/classpath/classpath/java/util/zip/ZipOutputStream.java Wed Sep 26 08:18:48 2001
+--- /home/tromey/gnu/egcs/classpath/classpath/java/util/zip/ZipOutputStream.java Thu Oct 18 12:05:41 2001
+++ java/util/zip/ZipOutputStream.java Mon Apr 2 10:28:54 2001
@@ -1,5 +1,5 @@
-/* java.util.zip.ZipOutputStream
@@ -278,7 +278,7 @@
- entry.setMethod(method);
- curMethod = method;
- /* Write the local file header */
-- writeLeInt(L_HDR_SIG);
+- writeLeInt(LOCSIG);
- writeLeShort(method == STORED
- ? ZIP_STORED_VERSION : ZIP_DEFLATED_VERSION);
- writeLeShort(flags);
@@ -363,7 +363,7 @@
- out.write(name);
- out.write(extra);
-
-- offset += L_SIZE + name.length + extra.length;
+- offset += LOCHDR + name.length + extra.length;
-
- /* Activate the entry. */
-
@@ -414,11 +414,11 @@
- /* Now write the data descriptor entry if needed. */
- if (curMethod == DEFLATED && (curEntry.flags & 8) != 0)
- {
-- writeLeInt(D_HDR_SIG);
+- writeLeInt(EXTSIG);
- writeLeInt((int)curEntry.getCrc());
- writeLeInt((int)curEntry.getCompressedSize());
- writeLeInt((int)curEntry.getSize());
-- offset += D_SIZE;
+- offset += EXTHDR;
- }
-
- entries.addElement(curEntry);
@@ -471,7 +471,7 @@
- ZipEntry entry = (ZipEntry) enum.nextElement();
-
- int method = entry.getMethod();
-- writeLeInt(C_HDR_SIG);
+- writeLeInt(CENSIG);
- writeLeShort(method == STORED
- ? ZIP_STORED_VERSION : ZIP_DEFLATED_VERSION);
- writeLeShort(method == STORED
@@ -545,11 +545,11 @@
+ {
out.write(comment);
- numEntries++;
-- sizeEntries += C_SIZE + name.length + extra.length + comment.length;
+- sizeEntries += CENHDR + name.length + extra.length + comment.length;
+ bytes += comment.length;
}
-- writeLeInt(EC_HDR_SIG);
+- writeLeInt(ENDSIG);
- writeLeShort(0); /* disk number */
- writeLeShort(0); /* disk with start of central dir */
- writeLeShort(numEntries);