}
    public static synchronized void setURLStreamHandlerFactory(            URLStreamHandlerFactory fac) {        if ((factory != null) && (fac != null)) {             throw new Error("URLStreamHandlerFactory already set");         }        // Throw an exception if an extant security mgr precludes        // setting the factory.        SecurityManager s = System.getSecurityManager();        if (s != null) {            s.checkSetFactory();        }        factory = fac;    }