Changeset 1391 for branches/GNU/src/gcc/libjava/java/util/jar/JarFile.java
- Timestamp:
- Apr 27, 2004, 8:39:34 PM (22 years ago)
- Location:
- branches/GNU/src/gcc
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
libjava/java/util/jar/JarFile.java (modified) (12 diffs, 1 prop)
Legend:
- Unmodified
- Added
- Removed
-
branches/GNU/src/gcc
- Property svn:ignore
-
old new 26 26 configure.vr 27 27 configure.vrs 28 28 29 Makefile 29 dir.info30 30 lost+found 31 31 update.out
-
- Property svn:ignore
-
branches/GNU/src/gcc/libjava/java/util/jar/JarFile.java
-
Property cvs2svn:cvs-rev
changed from
1.1to1.1.1.2
r1390 r1391 1 1 /* JarFile.java - Representation of a jar file 2 Copyright (C) 2000 Free Software Foundation, Inc.2 Copyright (C) 2000 Free Software Foundation, Inc. 3 3 4 4 This file is part of GNU Classpath. … … 68 68 /** 69 69 * The manifest of this file, if any, otherwise null. 70 * Read by the constructor.71 */ 72 private finalManifest manifest;73 74 /** W ether to verify the manifest and all entries*/70 * Read . 71 */ 72 private Manifest manifest; 73 74 /** W */ 75 75 private boolean verify; 76 76 77 78 79 77 80 // Constructors 78 81 79 82 /** 80 * Creates a new JarFile, tries to read the manifest and if the manifest 81 * exists verifies it. 83 * Creates a new JarFile. All jar entries are verified (when a Manifest file 84 * for this JarFile exists). You need to actually open and read the complete 85 * jar entry (with <code>getInputStream()</code>) to check its signature. 82 86 * 83 87 * @param fileName the name of the file to open … … 91 95 92 96 /** 93 * Creates a new JarFile, tries to read the manifest and if the manifest 94 * exists and verify is true verfies it. 97 * Creates a new JarFile. If verify is true then all jar entries are 98 * verified (when a Manifest file for this JarFile exists). You need to 99 * actually open and read the complete jar entry 100 * (with <code>getInputStream()</code>) to check its signature. 95 101 * 96 102 * @param fileName the name of the file to open … … 104 110 { 105 111 super(fileName); 106 manifest = readManifest();107 112 if (verify) 108 verify(); 109 } 110 111 /** 112 * Creates a new JarFile, tries to read the manifest and if the manifest 113 * exists verifies it. 113 { 114 manifest = readManifest(); 115 verify(); 116 } 117 } 118 119 /** 120 * Creates a new JarFile. All jar entries are verified (when a Manifest file 121 * for this JarFile exists). You need to actually open and read the complete 122 * jar entry (with <code>getInputStream()</code>) to check its signature. 114 123 * 115 124 * @param file the file to open as a jar file … … 123 132 124 133 /** 125 * Creates a new JarFile, tries to read the manifest and if the manifest 126 * exists and verify is true verfies it. 134 * Creates a new JarFile. If verify is true then all jar entries are 135 * verified (when a Manifest file for this JarFile exists). You need to 136 * actually open and read the complete jar entry 137 * (with <code>getInputStream()</code>) to check its signature. 127 138 * 128 139 * @param file the file to open to open as a jar file … … 136 147 { 137 148 super(file); 138 manifest = readManifest();139 149 if (verify) 140 verify(); 141 } 142 143 /** 144 * Creates a new JarFile with the indicated mode, tries to read the 150 { 151 manifest = readManifest(); 152 verify(); 153 } 154 } 155 156 /** 157 * Creates a new JarFile with the indicated mode. If verify is true then 158 * all jar entries are verified (when a Manifest file for this JarFile 159 * exists). You need to actually open and read the complete jar entry 160 * (with <code>getInputStream()</code>) to check its signature. 145 161 * manifest and if the manifest exists and verify is true verfies it. 146 162 * … … 160 176 { 161 177 super(file, mode); 162 manifest = readManifest();163 178 if (verify) 164 verify(); 179 { 180 manifest = readManifest(); 181 verify(); 182 } 165 183 } 166 184 … … 194 212 { 195 213 InputStream in = super.getInputStream(manEntry); 214 196 215 return new Manifest(in); 197 216 } 198 217 else 199 218 { 219 200 220 return null; 201 221 } … … 203 223 catch (IOException ioe) 204 224 { 225 205 226 return null; 206 227 } … … 242 263 ZipEntry zip = (ZipEntry) entries.nextElement(); 243 264 JarEntry jar = new JarEntry(zip); 265 266 267 268 269 270 271 272 273 274 244 275 if (manifest != null) 245 276 { … … 262 293 { 263 294 JarEntry jarEntry = new JarEntry(entry); 295 296 297 298 299 300 301 302 303 304 264 305 if (manifest != null) 265 306 { … … 302 343 * contain a manifest file. 303 344 */ 304 public Manifest getManifest() 305 { 345 public Manifest getManifest() throws IOException 346 { 347 if (!manifestRead) 348 manifest = readManifest(); 349 306 350 return manifest; 307 351 } -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.
