This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: ZipFile speed improvement patch
- From: Tom Tromey <tromey at redhat dot com>
- To: Mark Wielaard <mark at klomp dot org>
- Cc: java-patches at gcc dot gnu dot org
- Date: 31 Oct 2002 12:23:59 -0700
- Subject: Re: ZipFile speed improvement patch
- References: <1035725650.29035.1303.camel@elsschot>
- Reply-to: tromey at redhat dot com
>>>>> "Mark" == Mark Wielaard <mark@klomp.org> writes:
Mark> 2002-10-27 Mark Wielaard <mark@klomp.org>
Mark> * java/util/zip/ZipFile.java (readLeShort): Take and use DataInput as
Mark> argument.
Mark> (readLeShort): Likewise and use byte[].
Mark> (readLeInt): Likewise.
Mark> (readEntries): Use new versions of methods and use byte[] for reading
Mark> a complete zip entry. Add ZipFile name to exceptions.
Mark> (entries): Add ZipFile name to exceptions.
Mark> (getEntry): Likewise.
Mark> (checkLocalHeader): Use new versions of methods and add ZipFile name
Mark> to exceptions.
Mark> OK to commit?
Yes.
Mark> - private final int readLeShort() throws IOException {
Mark> - return raf.readUnsignedByte() | raf.readUnsignedByte() << 8;
Mark> + private final int readLeShort(DataInput di) throws IOException {
Mark> + byte[] b = new byte[2];
This would be a good opportunity to fix a couple indentation bugs
here. readLeInt also has the brace in the wrong place.
Tom