/[classpath]/classpath/java/util/jar/JarFile.java
ViewVC logotype

Diff of /classpath/java/util/jar/JarFile.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.10.2.5 by gnu_andrew, Sat Sep 10 15:31:47 2005 UTC revision 1.10.2.6 by tromey, Thu Oct 6 03:03:17 2005 UTC
# Line 304  public class JarFile extends ZipFile Line 304  public class JarFile extends ZipFile
304     *     *
305     * @exception IllegalStateException when the JarFile is already closed     * @exception IllegalStateException when the JarFile is already closed
306     */     */
307    public Enumeration entries() throws IllegalStateException    public Enumeration<JarEntry> entries() throws IllegalStateException
308    {    {
309      return new JarEnumeration(super.entries(), this);      return new JarEnumeration(super.entries(), this);
310    }    }
# Line 313  public class JarFile extends ZipFile Line 313  public class JarFile extends ZipFile
313     * Wraps a given Zip Entries Enumeration. For every zip entry a     * Wraps a given Zip Entries Enumeration. For every zip entry a
314     * JarEntry is created and the corresponding Attributes are looked up.     * JarEntry is created and the corresponding Attributes are looked up.
315     */     */
316    private static class JarEnumeration implements Enumeration    private static class JarEnumeration implements Enumeration<JarEntry>
317    {    {
318    
319      private final Enumeration entries;      private final Enumeration<? extends ZipEntry> entries;
320      private final JarFile jarfile;      private final JarFile jarfile;
321    
322      JarEnumeration(Enumeration e, JarFile f)      JarEnumeration(Enumeration<? extends ZipEntry> e, JarFile f)
323      {      {
324        entries = e;        entries = e;
325        jarfile = f;        jarfile = f;
# Line 330  public class JarFile extends ZipFile Line 330  public class JarFile extends ZipFile
330        return entries.hasMoreElements();        return entries.hasMoreElements();
331      }      }
332    
333      public Object nextElement()      public JarEntry nextElement()
334      {      {
335        ZipEntry zip = (ZipEntry) entries.nextElement();        ZipEntry zip = (ZipEntry) entries.nextElement();
336        JarEntry jar = new JarEntry(zip);        JarEntry jar = new JarEntry(zip);

Legend:
Removed from v.1.10.2.5  
changed lines
  Added in v.1.10.2.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26