|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectca.infoway.messagebuilder.util.xml.ClasspathResource
public class ClasspathResource
A class that makes it easy to read a resource on the classpath as an XML document.
Constructor Summary | |
---|---|
ClasspathResource(Class<?> c,
String resourceName)
Standard constructor. |
|
ClasspathResource(String resourceName)
Standard constructor. |
Method Summary | |
---|---|
InputStream |
getInputStream()
Obtain the classpath resource as a stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ClasspathResource(String resourceName)
Standard constructor.
Using this constructor is equivalent to
ClasspathResource.class.getClassLoader().getResourceAsStream(resourceName)
resourceName
- - the resource name.public ClasspathResource(Class<?> c, String resourceName)
Standard constructor.
Using this constructor is equivalent to
c.getResourceAsStream(resourceName)
c
- - a class whose package helps identify the location of the resource name.resourceName
- - the resource name that can be found relative to the class, cMethod Detail |
---|
public InputStream getInputStream()
Obtain the classpath resource as a stream.
getInputStream
in interface InputStreamResource
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |