ch.elca.el4j.core.io
Class ExplicitClassPathResource
java.lang.Object
org.springframework.core.io.AbstractResource
org.springframework.core.io.AbstractFileResolvingResource
org.springframework.core.io.ClassPathResource
ch.elca.el4j.core.io.ExplicitClassPathResource
- All Implemented Interfaces:
- InputStreamSource, Resource
public class ExplicitClassPathResource
- extends ClassPathResource
This is an explicit class path resource. A normal class path resource has
only a path that can point to multiple resources. By using the given url too
this resource explicitly points to one resource.
- Author:
- Martin Zeltner (MZE)
- File-location:
- ExplicitClassPathResource
- Last check-in date:
- 2009-12-01 10:59:54 +0100 (Di, 01. Dez 2009) by jonasha for revision 4010
ExplicitClassPathResource
public ExplicitClassPathResource(URL url,
String path,
ClassLoader classLoader)
- Constructor with an explicit url for the given class path resource.
- Parameters:
url
- The explicit url for this class path resource.path
- The path to get this resource from class loader. This path can
return a different resource than the given url points to.classLoader
- The class loader used to load the given url.
getURL
public URL getURL()
throws IOException
- Specified by:
getURL
in interface Resource
- Overrides:
getURL
in class ClassPathResource
- Returns:
- Returns the explicit url for this class path resource.
- Throws:
IOException
getInputStream
public InputStream getInputStream()
throws IOException
- Specified by:
getInputStream
in interface InputStreamSource
- Overrides:
getInputStream
in class ClassPathResource
- Returns:
- Returns the input stream of the given url.
- Throws:
IOException
equals
public boolean equals(Object obj)
-
- Overrides:
equals
in class ClassPathResource
hashCode
public int hashCode()
- Overrides:
hashCode
in class ClassPathResource
Copyright © 2005-2011 ELCA. All Rights Reserved.