Code example for Manifest

0
            String manifestPath = 
            	classPath.substring(0, jarIndex + 1) + MANIFEST_PATH;
            try { 
                URL manifestUrl = new URL(manifestPath);
                InputStream manifestStream = manifestUrl.openStream();
                Manifest manifest = new Manifest(manifestStream);
                return manifest;
            }  
            catch (IOException e) {
            	throw new ResourceNotFoundException( 
            			"IO Error retrieving manifest.", e);
            } 
        } 
        else { 
        	throw new ResourceNotFoundException( 
        			"Class is not in a JAR archive " + klass.getName() + ".");
        } 
    } 
	 
	/** 
	 * Returns XMLReader validating against given XML schema.