public class ClassLoaderResource extends AbstractIoResource<java.lang.ClassLoader>
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
resourceName |
BY_NAME_COMPARATOR, NAME_EXTRACTOR
Constructor and Description |
---|
ClassLoaderResource(java.lang.ClassLoader loader,
java.lang.String resourceName) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getName() |
java.lang.ClassLoader |
getResourceLoader() |
java.io.InputStream |
openInputStream() |
getResourceType, getResourceValue, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forResource
findByName, findFirstMatchByName, getNameList, getNames, ofName, removeByName, safeCompareByName
public ClassLoaderResource(java.lang.ClassLoader loader, java.lang.String resourceName)
public java.lang.ClassLoader getResourceLoader()
public java.lang.String getName()
getName
in interface NamedResource
getName
in class AbstractIoResource<java.lang.ClassLoader>
public java.io.InputStream openInputStream() throws java.io.IOException
InputStream
for the resource's datajava.io.IOException
- If failed to open the stream