Sdílet prostřednictvím


URL.SetURLStreamHandlerFactory(IURLStreamHandlerFactory) Method

Definition

Sets an application's URLStreamHandlerFactory.

[Android.Runtime.Register("setURLStreamHandlerFactory", "(Ljava/net/URLStreamHandlerFactory;)V", "")]
public static void SetURLStreamHandlerFactory (Java.Net.IURLStreamHandlerFactory? fac);
[<Android.Runtime.Register("setURLStreamHandlerFactory", "(Ljava/net/URLStreamHandlerFactory;)V", "")>]
static member SetURLStreamHandlerFactory : Java.Net.IURLStreamHandlerFactory -> unit

Parameters

fac
IURLStreamHandlerFactory

the desired factory.

Attributes

Exceptions

if a URLStreamHandlerFactory has already been installed for the current VM.

Remarks

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.

Java documentation for java.net.URL.setURLStreamHandlerFactory(java.net.URLStreamHandlerFactory).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to