code: public static InputStream getResourceAsStream(String name) {
  		// try with caller classloader
  		ClassLoader loader = getClassLoaderContextAt(3);
  		InputStream in = (loader == null) ? null : loader.getResourceAsStream(name);
  		if (in == null) {
  			// try with context classloader if set & different
  			ClassLoader contextLoader = Thread.currentThread().getContextClassLoader();
  			if (contextLoader != null && contextLoader != loader) {
  				in = contextLoader.getResourceAsStream(name);
  			}
  		}
  		return in;
  	}
docs: Gets an InputStream to a resource of a specified name. First, the
  caller's classloader is used to load the resource and if it fails the
  thread's context classloader is used to load the resource.