@Component(value="cuba_Resources") public class ResourcesImpl extends ConfigurationResourceLoader implements Resources
confDir
Constructor and Description |
---|
ResourcesImpl(java.lang.ClassLoader classLoader) |
ResourcesImpl(java.lang.ClassLoader classLoader,
java.io.File confDir) |
ResourcesImpl(Scripting scripting) |
Modifier and Type | Method and Description |
---|---|
java.io.InputStream |
getResourceAsStream(java.lang.String location)
Searches for a resource according to the rules explained in
Resources and returns the resource as stream
if found. |
java.lang.String |
getResourceAsString(java.lang.String location)
Searches for a resource according to the rules explained in
Resources and returns the resource as string
if found. |
getDefaultConfDir, getResource, setConfDir
addProtocolResolver, clearResourceCaches, getClassLoader, getProtocolResolvers, getResourceByPath, getResourceCache, setClassLoader
@Inject public ResourcesImpl(Scripting scripting)
public ResourcesImpl(java.lang.ClassLoader classLoader)
public ResourcesImpl(java.lang.ClassLoader classLoader, java.io.File confDir)
@Nullable public java.io.InputStream getResourceAsStream(java.lang.String location)
Resources
Resources
and returns the resource as stream
if found. The returned stream should be closed after use.getResourceAsStream
in interface Resources
location
- resource location@Nullable public java.lang.String getResourceAsString(java.lang.String location)
Resources
Resources
and returns the resource as string
if found.getResourceAsString
in interface Resources
location
- resource location