public class ResourceURLContent extends URLContent
Constructor and Description |
---|
ResourceURLContent(java.lang.Class<?> resourceClass,
java.lang.String resourceName)
Creates a content for
resourceName relative to resourceClass . |
ResourceURLContent(java.lang.Class<?> resourceClass,
java.lang.String resourceName,
boolean multiPartResource)
Creates a content for
resourceName relative to resourceClass . |
ResourceURLContent(java.lang.ClassLoader resourceClassLoader,
java.lang.String resourceName)
Creates a content for
resourceName relative to resourceClassLoader . |
ResourceURLContent(java.net.URL url,
boolean multiPartResource)
Creates a content for
resourceUrl . |
Modifier and Type | Method and Description |
---|---|
boolean |
isMultiPartResource()
Returns
true if the resource is a multi part resource stored
in a folder with other required resources. |
equals, getJAREntryName, getJAREntryURL, getSize, getURL, hashCode, isJAREntry, openStream
public ResourceURLContent(java.lang.Class<?> resourceClass, java.lang.String resourceName)
resourceName
relative to resourceClass
.resourceClass
- the class relative to the resource name to loadresourceName
- the name of the resourcejava.lang.IllegalArgumentException
- if the resource doesn't match a valid resource.public ResourceURLContent(java.lang.Class<?> resourceClass, java.lang.String resourceName, boolean multiPartResource)
resourceName
relative to resourceClass
.resourceClass
- the class relative to the resource name to loadresourceName
- the name of the resourcemultiPartResource
- if true
then the resource is a multi part resource
stored in a folder with other required resourcesjava.lang.IllegalArgumentException
- if the resource doesn't match a valid resource.public ResourceURLContent(java.lang.ClassLoader resourceClassLoader, java.lang.String resourceName)
resourceName
relative to resourceClassLoader
.
resourceName
is absolute and shouldn't start with a slash.resourceClassLoader
- the class loader used to load the given resource nameresourceName
- the name of the resourcejava.lang.IllegalArgumentException
- if the resource doesn't match a valid resource.public ResourceURLContent(java.net.URL url, boolean multiPartResource)
resourceUrl
.url
- the URL of the resource
© Copyright 2024 Space Mushrooms
Distributed under GNU General Public License