humble-video-noarch/src/main/java/io/humble/video/customio/HumbleIO.java
public IURLProtocolHandler mapIO(String url, IURLProtocolHandler handler,
      boolean unmapUrlOnOpen)
  {
    {
      if (url == null || url.length() <= 0)
        throw new IllegalArgumentException("must pass in non-zero url");
      if (handler == null)
      {
        throw new IllegalArgumentException("must pass in a non null handler");
      }
      String streamName = URLProtocolManager.getResourceFromURL(url);
      RegistrationInformation tuple = new RegistrationInformation(streamName,
          handler, unmapUrlOnOpen);
      RegistrationInformation oldTuple = mURLs.putIfAbsent(streamName, tuple);
      return oldTuple == null ? null : oldTuple.getHandler();
    }
  }
public IURLProtocolHandler mapIO(String url, IURLProtocolHandler handler,
      boolean unmapUrlOnOpen)
  {
    {
      if (url == null || url.length() <= 0)
        throw new IllegalArgumentException("must pass in non-zero url");
      if (handler == null)
      {
        throw new IllegalArgumentException("must pass in a non null handler");
      }
      String streamName = URLProtocolManager.getResourceFromURL(url);
      RegistrationInformation tuple = new RegistrationInformation(streamName,
          handler, unmapUrlOnOpen);
      RegistrationInformation oldTuple = mURLs.putIfAbsent(streamName, tuple);
      return oldTuple == null ? null : oldTuple.getHandler();
    }
  }
Maps the given url or file name to the given {@link IURLProtocolHandler} or
so that Humble calls to open the URL it will call back to the handler.

<p>

If you set unmapOnOpen to false, or you never actually open this mapping,
then you must ensure that you call {@link #unmapIO(String)} at some point
in time to remove the mapping, or we will hold onto references to the
handler you passed in.

</p>

@param url A file or URL. If a URL, the protocol will be stripped off and
replaced with {@link #DEFAULT_PROTOCOL} when registering.
@param handler An {@link IURLProtocolHandler} for the url
@param unmapUrlOnOpen If true, the handler will unmap itself after an
{@link Container} opens the registered URL. If true, you do not
need to call {@link #unmapIO(String)} for this url.
@return The previous handler for this url, or null if none.


@throws IllegalArgumentException if url is null or zero length
@throws IllegalArgumentException if handler is null