Sdílet prostřednictvím


URLConnection.SetContentHandlerFactory(IContentHandlerFactory) Method

Definition

Sets the ContentHandlerFactory of an application.

[Android.Runtime.Register("setContentHandlerFactory", "(Ljava/net/ContentHandlerFactory;)V", "")]
public static void SetContentHandlerFactory (Java.Net.IContentHandlerFactory? fac);
[<Android.Runtime.Register("setContentHandlerFactory", "(Ljava/net/ContentHandlerFactory;)V", "")>]
static member SetContentHandlerFactory : Java.Net.IContentHandlerFactory -> unit

Parameters

fac
IContentHandlerFactory

the desired factory.

Attributes

Exceptions

if the factory has been already set.

Remarks

Sets the ContentHandlerFactory of an application. It can be called at most once by an application.

The ContentHandlerFactory instance is used to construct a content handler from a content type

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.URLConnection.setContentHandlerFactory(java.net.ContentHandlerFactory).

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