setURLStreamHandlerFactory(URLStreamHandlerFactory)
- Static method in class java.net.URL public static void setURLStreamHandlerFactory (URLStreamHandlerFactory fac) Sets an application's URLStreamHandlerFactory. This method can be called at most once in a given Java Virtual Machine. The URLStreamHandlerFactory instance is used to construct a stream protocol handler from a protocol name. If there is a security manager, this method first calls the security manager's checkSetFactory method to ensure the operation is allowed. This could result in a SecurityException.Parameters: fac - the desired factory.Throws: Error - if the application has already set a factory. - if a security manager exists and its method doesn't allow the operation.SecurityException - if a security manager exists and its checkSetFactory method doesn't allow the operation.See Also: URL(java.lang.String, java.lang.String, int, java.lang.String) , URLStreamHandlerFactory , SecurityManager.checkSetFactory() | ||||
Search Dictionary:
