Code example for FileNotFoundException

0
	 * This implementation throws a FileNotFoundException, assuming 
	 * that the resource cannot be resolved to a URL. 
	 */ 
	@Override 
	public URL getURL() throws IOException {
		throw new FileNotFoundException(getDescription() + " cannot be resolved to URL");
	} 
 
	/** 
	 * This implementation builds a URI based on the URL returned 
	 * by {@link #getURL()}. 
	 */ 
	@Override 
	public URI getURI() throws IOException {
		URL url = getURL();
		try { 
			return ResourceUtils.toURI(url);
		} 
		catch (URISyntaxException ex) {
			throw new NestedIOException("Invalid URI [" + url + "]", ex);
Experience pair programming with AI  Get Codota for Java