public interface Scheme
Modifier and Type | Field and Description |
---|---|
static Scheme |
HTTP |
static Scheme |
HTTPS |
static Scheme |
JAR
The scheme can be used to access resources located inside a JAR file.
|
Modifier and Type | Method and Description |
---|---|
default java.lang.String |
name()
Returns a string that represents the name of the scheme.
|
static Scheme |
of(java.lang.String name)
Returns the
Scheme instance for the given name. |
static final Scheme HTTP
static final Scheme HTTPS
static final Scheme JAR
The JAR scheme will be treated as the standard "https" scheme.
By default, the URL to a resource located inside a JAR file has the "jar:file:" scheme which is treated as a non-standard scheme such as "jar:file:/path/*.jar!/path/resource.file". So, it will be canonicalized to the "jar://file/path/*.jar!/path/resource.file" form.
static Scheme of(java.lang.String name)
Scheme
instance for the given name.java.lang.IllegalArgumentException
- when the name
is empty of blankString.toLowerCase()
.default java.lang.String name()