@Immutable public final class URLProtocolRegistry extends Object
EURLProtocol, but it may be
extended by custom protocols| Modifier and Type | Method and Description |
|---|---|
static Collection<IURLProtocol> |
getAllProtocols() |
static IURLProtocol |
getProtocol(IURLData aURL)
Try to evaluate the matching URL protocol from the passed URL
|
static IURLProtocol |
getProtocol(String sURL)
Try to evaluate the matching URL protocol from the passed URL
|
static String |
getWithoutProtocol(String sURL)
Return the passed URL where the protocol has been stripped (if known)
|
static boolean |
hasKnownProtocol(IURLData aURL)
Check if the passed URL has any known protocol
|
static boolean |
hasKnownProtocol(String sURL)
Check if the passed URL has any known protocol
|
static void |
registerProtocol(IURLProtocol aProtocol)
Registers a new protocol
|
static void |
reinitialize()
Reinitialize all protocols.
|
public static void reinitialize()
EURLProtocol values and
invokes all SPI implementations.public static void registerProtocol(@Nonnull IURLProtocol aProtocol)
aProtocol - The protocol to be registered. May not be null.IllegalArgumentException - If another handler for this protocol is already installed.@Nonnull @ReturnsMutableCopy public static Collection<IURLProtocol> getAllProtocols()
@Nullable public static IURLProtocol getProtocol(@Nullable String sURL)
sURL - The URL to get the protocol fromnull if unresolved@Nullable public static IURLProtocol getProtocol(@Nullable IURLData aURL)
aURL - The URL datanull if unresolvedpublic static boolean hasKnownProtocol(@Nullable String sURL)
sURL - The URL to analyzetrue if the protocol is known, false
otherwisepublic static boolean hasKnownProtocol(@Nullable IURLData aURL)
aURL - The URL to analyzetrue if the protocol is known, false
otherwiseCopyright © 2006–2014 phloc systems. All rights reserved.