
public class URLProtocolManager extends Object
URLProtocolManager mgr = URLProtocolManager.getManager();
mgr.registerFactory("myprotocol", myProtocolHandlerFactory);
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_PROTOCOL |
static String |
NULL_PROTOCOL |
| Modifier and Type | Method and Description |
|---|---|
IURLProtocolHandler |
getHandler(String url,
int flags) |
static URLProtocolManager |
getManager()
Factory method to get the global protocol manager.
|
static String |
getProtocolFromURL(String url)
Get the protocol portion of a url.
|
static String |
getResourceFromURL(String url)
Get the resource portion of a url.
|
static void |
init()
Method to be called to initialize this library.
|
IURLProtocolHandlerFactory |
registerFactory(String protocol,
IURLProtocolHandlerFactory factory)
Register a new factory for IURLProtocolHandlers for a given protocol.
|
public static final String DEFAULT_PROTOCOL
public static final String NULL_PROTOCOL
public static URLProtocolManager getManager()
public static void init()
public IURLProtocolHandlerFactory registerFactory(String protocol, IURLProtocolHandlerFactory factory)
FFMPEG is very picky; protocols must be only alpha characters (no numbers).
protocol - The protocol, without colon, this factory is to be used for.factory - The factory for the manager to use whenever a handler is requested for a registered protocol;
null means disable handling for this factory.public IURLProtocolHandler getHandler(String url, int flags)
public static String getResourceFromURL(String url)
http://www.humble.io/videoThe protocol string is
http and the resource
string is www.humble.io/videourl - The url to parseCopyright © 2018 Humble Software. All rights reserved.