Look up a resource by name, and open an InputStream for reading it.
Look up a resource by name, and open an InputStream for reading it.
Name of the resource to search for.
InputStream for reading the found resource, if a resource was found.
Same as asStream but throws a NoSuchElementException if resource is not found
Get URL of given resource A default argument of empty string is provided to conveniently get the root resource URL using {{Resource.getUrl()}}
Finds and loads class resources or class loader resources.
The default implementation of this trait is the Resource object, which looks up resources using the current thread's context class loader. The Resource object also offers several other Resource implementations, through its methods
at
,from
, andmy
.at
searches from a Class,from
searches from a ClassLoader, andmy
searches from the class, trait, or object surrounding the call.ClassLoader#getResource
Class#getResource
Different ways of loading a file as an InputStream
Resource