/[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.7 by mark, Fri Nov 29 14:04:19 2002 UTC revision 1.8 by jewel, Mon Feb 3 14:24:32 2003 UTC
# Line 71  public class JarFile extends ZipFile Line 71  public class JarFile extends ZipFile
71     */     */
72    private Manifest manifest;    private Manifest manifest;
73    
74    /** Wether to verify the manifest and all entries. */    /** Whether to verify the manifest and all entries. */
75    private boolean verify;    private boolean verify;
76    
77    /** Wether the has already been loaded. */    /** Whether the has already been loaded. */
78    private boolean manifestRead = false;    private boolean manifestRead = false;
79    
80    // Constructors    // Constructors
# Line 109  public class JarFile extends ZipFile Line 109  public class JarFile extends ZipFile
109      FileNotFoundException, IOException      FileNotFoundException, IOException
110    {    {
111      super(fileName);      super(fileName);
112        if (verify) {
113            manifest = readManifest();
114            verify();
115        }
116    }    }
117    
118    /**    /**
# Line 141  public class JarFile extends ZipFile Line 145  public class JarFile extends ZipFile
145      IOException      IOException
146    {    {
147      super(file);      super(file);
148        if (verify) {
149            manifest = readManifest();
150            verify();
151        }
152    }    }
153    
154    /**    /**
# Line 165  public class JarFile extends ZipFile Line 173  public class JarFile extends ZipFile
173      FileNotFoundException, IOException, IllegalArgumentException      FileNotFoundException, IOException, IllegalArgumentException
174    {    {
175      super(file, mode);      super(file, mode);
176        if (verify) {
177            manifest = readManifest();
178            verify();
179        }
180    }    }
181    
182    // Methods    // Methods
# Line 196  public class JarFile extends ZipFile Line 208  public class JarFile extends ZipFile
208          if (manEntry != null)          if (manEntry != null)
209            {            {
210              InputStream in = super.getInputStream(manEntry);              InputStream in = super.getInputStream(manEntry);
211                manifestRead = true;
212              return new Manifest(in);              return new Manifest(in);
213            }            }
214          else          else
215            {            {
216                manifestRead = true;
217              return null;              return null;
218            }            }
219        }        }
220      catch (IOException ioe)      catch (IOException ioe)
221        {        {
222            manifestRead = true;
223          return null;          return null;
224        }        }
225    }    }

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

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