public URL getResource(final String name) { return ClassLoaderUtils.getResource(name, getClass()); }
public URL getResource(final String name) { return ClassLoaderUtils.getResource(name, getClass()); }
/** * This is a convenience method to load a resource as a stream. * * The algorithm used to find the resource is given in getResource() * * @param resourceName The name of the resource to load * @param callingClass The Class object of the calling object */ public static InputStream getResourceAsStream(final String resourceName, final Class<?> callingClass) { final URL url = getResource(resourceName, callingClass); try { return url != null ? url.openStream() : null; } catch (final IOException e) { return null; } }
URL url = ClassLoaderUtils.getResource(getPropertiesFile(), DefaultHomeLocator.class); if (url != null)