java.lang.Object | |
↳ | sun.net.URLCanonicalizer |
Helper class to map URL "abbreviations" to real URLs. The default implementation supports the following mappings: ftp.mumble.bar/... => ftp://ftp.mumble.bar/... gopher.mumble.bar/... => gopher://gopher.mumble.bar/... other.name.dom/... => http://other.name.dom/... /foo/... => file:/foo/... Full URLs (those including a protocol name) are passed through unchanged. Subclassers can override or extend this behavior to support different or additional canonicalization policies.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates the default canonicalizer instance.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Given a possibly abbreviated URL (missing a protocol name, typically),
this method's job is to transform that URL into a canonical form,
by including a protocol name and additional syntax, if necessary.
| |||||||||||
Given a possibly abbreviated URL, this predicate function returns
true if it appears that the URL contains a protocol name
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns true if the URL is just a single name, no periods or
slashes, false otherwise
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Creates the default canonicalizer instance.
Given a possibly abbreviated URL (missing a protocol name, typically), this method's job is to transform that URL into a canonical form, by including a protocol name and additional syntax, if necessary. For a correctly formed URL, this method should just return its argument.
Given a possibly abbreviated URL, this predicate function returns true if it appears that the URL contains a protocol name
Returns true if the URL is just a single name, no periods or slashes, false otherwise