/** * Read the manifest from given manifest VirtualFile. * * @param manifest the VF to read from * @return JAR's manifest * @throws IOException if problems while opening VF stream occur */ public static Manifest readManifest(VirtualFile manifest) throws IOException { if (manifest == null) { throw MESSAGES.nullArgument("manifest file"); } InputStream stream = new PaddedManifestStream(manifest.openStream()); try { return new Manifest(stream); } finally { safeClose(stream); } }