diff -ru CVS/classpath/java/util/zip/ZipEntry.java updated/classpath/java/util/zip/ZipEntry.java
--- CVS/classpath/java/util/zip/ZipEntry.java	2010-06-27 21:01:34.000000000 +0400
+++ updated/classpath/java/util/zip/ZipEntry.java	2010-06-27 21:04:06.000000000 +0400
@@ -1,5 +1,6 @@
 /* ZipEntry.java --
-   Copyright (C) 2001, 2002, 2004, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2002, 2004, 2005, 2010
+   Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -67,6 +68,9 @@
   private int crc;
   /** Comment or null if none */
   private String comment = null;
+
+  private short generalPurposeFlags;
+
   /** The compression method. Either DEFLATED or STORED, by default -1. */
   private byte method = -1;
   /** Flags specifying what we know about this entry */
@@ -150,12 +154,12 @@
       {
        Calendar cal = Calendar.getInstance();
        cal.setTimeInMillis(time);
-       dostime = (cal.get(Calendar.YEAR) - 1980 & 0x7f) << 25
-          | (cal.get(Calendar.MONTH) + 1) << 21
-          | (cal.get(Calendar.DAY_OF_MONTH)) << 16
-          | (cal.get(Calendar.HOUR_OF_DAY)) << 11
-          | (cal.get(Calendar.MINUTE)) << 5
-          | (cal.get(Calendar.SECOND)) >> 1;
+       dostime = (((cal.get(Calendar.YEAR) - 1980) & 0x7f) << 25)
+                | ((cal.get(Calendar.MONTH) + 1) << 21)
+                | (cal.get(Calendar.DAY_OF_MONTH) << 16)
+                | (cal.get(Calendar.HOUR_OF_DAY) << 11)
+                | (cal.get(Calendar.MINUTE) << 5)
+                | (cal.get(Calendar.SECOND) >> 1);
        known |= KNOWN_DOSTIME;
        return dostime;
       }
@@ -313,6 +317,27 @@
   }
 
   /**
+   * Sets in the value of the general purpose flags for the zip entry.
+   *
+   * @param generalPurposeFlags the general purpose flags.
+   */
+  void setGeneralPurposeFlags(int generalPurposeFlags)
+  {
+    this.generalPurposeFlags = (short) generalPurposeFlags;
+  }
+
+  /**
+   * Uses the general purpose flags to determine whether the entry is encrypted.
+   *
+   * @return {@code true} if the entry is encrypted, {@code false} otherwise.
+   */
+  boolean isEncrypted()
+  {
+    // bit 0 means it's encrypted.  bit 6 means strong encryption but in this case bit 0 is still set.
+    return (generalPurposeFlags & 0x1) != 0;
+  }
+
+  /**
    * Sets the compression method.  Only DEFLATED and STORED are
    * supported.
    * @exception IllegalArgumentException if method is not supported.
diff -ru CVS/classpath/java/util/zip/ZipFile.java updated/classpath/java/util/zip/ZipFile.java
--- CVS/classpath/java/util/zip/ZipFile.java	2010-06-27 21:01:50.000000000 +0400
+++ updated/classpath/java/util/zip/ZipFile.java	2010-06-27 21:04:10.000000000 +0400
@@ -1,5 +1,5 @@
 /* ZipFile.java --
-   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006
+   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2010
    Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
@@ -206,7 +206,7 @@
         catch (IOException _)
           {
           }
-        throw new ZipException("Not a valid zip file");
+        throw new ZipException("Not a valid zip file: " + name);
       }
   }
 
@@ -261,7 +261,8 @@
         if (inp.readLeInt() != CENSIG)
           throw new ZipException("Wrong Central Directory signature: " + name);
 
-        inp.skip(6);
+        inp.skip(4);
+        int generalPurposeFlags = inp.readLeShort();
         int method = inp.readLeShort();
         int dostime = inp.readLeInt();
         int crc = inp.readLeInt();
@@ -275,6 +276,7 @@
         String name = inp.readString(nameLen);
 
         ZipEntry entry = new ZipEntry(name);
+        entry.setGeneralPurposeFlags(generalPurposeFlags);
         entry.setMethod(method);
         entry.setCrc(crc & 0xffffffffL);
         entry.setSize(size & 0xffffffffL);
@@ -319,11 +321,11 @@
   /**
    * Calls the <code>close()</code> method when this ZipFile has not yet
    * been explicitly closed.
-   */
+   * /
   protected void finalize() throws IOException
   {
     if (!closed && raf != null) close();
-  }
+  }*/
 
   /**
    * Returns an enumeration of all Zip entries in this Zip file.
@@ -332,8 +334,6 @@
    */
   public Enumeration<? extends ZipEntry> entries()
   {
-    checkClosed();
-
     try
       {
         return new ZipEntryEnumeration(getEntries().values().iterator());
@@ -374,8 +374,6 @@
    */
   public ZipEntry getEntry(String name)
   {
-    checkClosed();
-
     try
       {
         LinkedHashMap<String, ZipEntry> entries = getEntries();
@@ -415,15 +413,26 @@
    */
   public InputStream getInputStream(ZipEntry entry) throws IOException
   {
-    checkClosed();
-
-    LinkedHashMap<String, ZipEntry> entries = getEntries();
     String name = entry.getName();
-    ZipEntry zipEntry = entries.get(name);
-    if (zipEntry == null)
-      return null;
+    ZipEntry zipEntry;
+    PartialInputStream inp;
+
+    synchronized(raf)
+      {
+        checkClosed();
+
+        if (entries == null)
+          readEntries();
+
+        zipEntry = entries.get(name);
+        if (zipEntry == null)
+          return null;
+        if (zipEntry.isEncrypted())
+          throw new ZipException("Entry is encrypted: " + name);
+
+        inp = new PartialInputStream(raf, 1024);
+      }
 
-    PartialInputStream inp = new PartialInputStream(raf, 1024);
     inp.seek(zipEntry.offset);
 
     if (inp.readLeInt() != LOCSIG)
@@ -482,8 +491,6 @@
    */
   public int size()
   {
-    checkClosed();
-
     try
       {
         return getEntries().size();
