This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ZipFile speed improvement patch


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]