Code example for JarFile

Methods: getManifest

0
		if (i != -1) {
			String pkgname = name.substring(0, i);
			pkg = getPackage(pkgname);
			if (pkg == null) {
				try { 
					Manifest man = tempJarFile.getManifest();
					if(man == null) throw new IOException();
					pkg = definePackage(pkgname, man);
				} catch (IOException e) {
					pkg = definePackage(pkgname, null, null, null, null, null, null, null);
				} 
			} 
		} 
		return pkg;
	} 
 
	protected Package definePackage(String name, Manifest man) throws IllegalArgumentException {
		String path = name.replace('.', '/').concat("/");
		String specTitle = null, specVersion = null, specVendor = null;
		String implTitle = null, implVersion = null, implVendor = null;
		String sealed = null;