Holger's Java API

## com.antelmann.net.protocol
Class URLStreamHandlerFactoryImpl

    java.lang.Object
      com.antelmann.net.protocol.URLStreamHandlerFactoryImpl

All Implemented Interfaces:
  URLStreamHandlerFactory

    public class URLStreamHandlerFactoryImpl

extends Object
implements URLStreamHandlerFactory

allows to more easily plug in custom protocols for use with `URL`

Since:
  08.05.2011, 00:16:53
Author:
  Holger Antelmann

Constructor Summary
`URLStreamHandlerFactoryImpl()`

Method Summary
`URLStreamHandler` `addHandler(String protocol, URLStreamHandler handler)`
`URLStreamHandler` `createURLStreamHandler(String protocol)`
`static String[]` `getRegisteredPackages()`
`String[]` `getRegisteredProtocols()`
`static boolean` `isRegisteredPackage(String pkg)`
`static boolean` `isSupportedProtocol(String protocol)`
`static void` `registerMyHandler()`
`static boolean` `registerPackage(String pkg)`
`static boolean` `registerPackage(String pkg, boolean prepend)`
`URLStreamHandler` `removeHandler(String protocol)`
`static boolean` `unregisterPackage(String pkg)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### URLStreamHandlerFactoryImpl

    public URLStreamHandlerFactoryImpl()

Method Detail

### registerMyHandler

    public static void registerMyHandler()

### registerPackage

    public static boolean registerPackage(String pkg)

### registerPackage

    public static boolean registerPackage(String pkg,
                                          boolean prepend)

### unregisterPackage

    public static boolean unregisterPackage(String pkg)

### isSupportedProtocol

    public static boolean isSupportedProtocol(String protocol)

### isRegisteredPackage

    public static boolean isRegisteredPackage(String pkg)

### getRegisteredPackages

    public static String[] getRegisteredPackages()

### addHandler

    public URLStreamHandler addHandler(String protocol,
                                       URLStreamHandler handler)

### removeHandler

    public URLStreamHandler removeHandler(String protocol)

### getRegisteredProtocols

    public String[] getRegisteredProtocols()

### createURLStreamHandler

    public URLStreamHandler createURLStreamHandler(String protocol)

  Specified by:
    `createURLStreamHandler` in interface `URLStreamHandlerFactory`

(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads