Code example for FileNotFoundException

0
			String path = resourceLocation.substring(CLASSPATH_URL_PREFIX.length());
			String description = "class path resource [" + path + "]";
			ClassLoader cl = ClassUtils.getDefaultClassLoader();
			URL url = (cl != null ? cl.getResource(path) : ClassLoader.getSystemResource(path));
			if (url == null) {
				throw new FileNotFoundException(description +
						" cannot be resolved to absolute file path because it does not exist"); 
			} 
			return getFile(url, description);
		} 
		try { 
			// try URL 
			return getFile(new URL(resourceLocation));
		} 
		catch (MalformedURLException ex) {
			// no URL -> treat as file path 
			return new File(resourceLocation);
		} 
	}