org.linkedin.util-core/src/main/java/org/linkedin/util/io/resource/URIResourceFactoryImpl.java
@Override
  public Resource createResource(URI uri) throws UnsupportedURIException
  {
    if(uri.getScheme() == null)
      return FileResource.createFromRoot(new File(uri.getPath()));

    SchemeURIResourceFactory factory = _factories.get(uri.getScheme());
    if(factory == null)
      throw new UnsupportedURIException("unsupported scheme " + uri.getScheme());

    return factory.createResource(uri, this);
  }
@Override
  public Resource createResource(URI uri) throws UnsupportedURIException
  {
    if(uri.getScheme() == null)
      return FileResource.createFromRoot(new File(uri.getPath()));

    SchemeURIResourceFactory factory = _factories.get(uri.getScheme());
    if(factory == null)
      throw new UnsupportedURIException("unsupported scheme " + uri.getScheme());

    return factory.createResource(uri, this);
  }
Based on the URI returns the right resource

@param uri
@return the resource
@throws UnsupportedURIException if the uri is not supported by this factory