private URL createSearchURL(URL url) throws MalformedURLException {
  if (url == null) {
    return url;
  }
  String protocol=url.getProtocol();
  if (isDirectory(url) || protocol.equals("jar")) {
    return url;
  }
  if (factory == null) {
    return new URL("jar","",-1,url.toString() + "!/");
  }
  return new URL("jar","",-1,url.toString() + "!/",factory.createURLStreamHandler("jar"));
}

private URL createSearchURL ( URL url ) throws MalformedURLException { if ( url == null ) { return url ; } String protocol = url . getProtocol ( ) ; if ( isDirectory ( url ) || protocol . equals ( "jar" ) ) { return url ; } if ( factory == null ) { return new URL ( "jar" , "" , - 1 , url . toString ( ) + "!/" ) ; } return new URL ( "jar" , "" , - 1 , url . toString ( ) + "!/" , factory . createURLStreamHandler ( "jar" ) ) ; }
returns an url that will be checked if it contains the class or resource . if the file component of the url is not a directory , a jar url will be created .
