public static Manifest getManifest(VirtualFile archive) throws IOException { if (archive == null) throw new IllegalArgumentException("Null archive"); VirtualFile manifest = archive.getChild(JarFile.MANIFEST_NAME); if (manifest == null) return null; InputStream stream = manifest.openStream(); try { return new Manifest(stream); } finally { try { stream.close(); } catch (IOException ignored) { } } }
public static Manifest getManifest(VirtualFile archive) throws IOException { if (archive == null) throw MESSAGES.illegalArgumentNull("archive"); VirtualFile manifest = archive.getChild(JarFile.MANIFEST_NAME); if (manifest == null) return null; InputStream stream = manifest.openStream(); try { return new Manifest(stream); } finally { try { stream.close(); } catch (IOException ignored) { } } }
path = path.substring(0, path.lastIndexOf("/")); VirtualFile classes = base.getChild(path); addResources(archive, base, classes);