Udostępnij za pośrednictwem


ContentHandler.GetContent Method

Definition

Overloads

GetContent(URLConnection)

Given a URL connect stream positioned at the beginning of the representation of an object, this method reads that stream and creates an object from it.

GetContent(URLConnection, Class[])

Given a URL connect stream positioned at the beginning of the representation of an object, this method reads that stream and creates an object that matches one of the types specified.

GetContent(URLConnection)

Given a URL connect stream positioned at the beginning of the representation of an object, this method reads that stream and creates an object from it.

[Android.Runtime.Register("getContent", "(Ljava/net/URLConnection;)Ljava/lang/Object;", "GetGetContent_Ljava_net_URLConnection_Handler")]
public abstract Java.Lang.Object? GetContent (Java.Net.URLConnection? urlc);
[<Android.Runtime.Register("getContent", "(Ljava/net/URLConnection;)Ljava/lang/Object;", "GetGetContent_Ljava_net_URLConnection_Handler")>]
abstract member GetContent : Java.Net.URLConnection -> Java.Lang.Object

Parameters

urlc
URLConnection

a URL connection.

Returns

the object read by the ContentHandler.

Attributes

Exceptions

if an IO error occurs during the retrieval of the object

Remarks

Given a URL connect stream positioned at the beginning of the representation of an object, this method reads that stream and creates an object from it.

Java documentation for java.net.ContentHandler.getContent(java.net.URLConnection).

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

GetContent(URLConnection, Class[])

Given a URL connect stream positioned at the beginning of the representation of an object, this method reads that stream and creates an object that matches one of the types specified.

[Android.Runtime.Register("getContent", "(Ljava/net/URLConnection;[Ljava/lang/Class;)Ljava/lang/Object;", "GetGetContent_Ljava_net_URLConnection_arrayLjava_lang_Class_Handler")]
public virtual Java.Lang.Object? GetContent (Java.Net.URLConnection? urlc, Java.Lang.Class[]? classes);
[<Android.Runtime.Register("getContent", "(Ljava/net/URLConnection;[Ljava/lang/Class;)Ljava/lang/Object;", "GetGetContent_Ljava_net_URLConnection_arrayLjava_lang_Class_Handler")>]
abstract member GetContent : Java.Net.URLConnection * Java.Lang.Class[] -> Java.Lang.Object
override this.GetContent : Java.Net.URLConnection * Java.Lang.Class[] -> Java.Lang.Object

Parameters

urlc
URLConnection

a URL connection.

classes
Class[]

an array of types requested

Returns

the object read by the ContentHandler that is the first match of the suggested types. null if none of the requested are supported.

Attributes

Exceptions

if an error occurred while obtaining the content.

Remarks

Given a URL connect stream positioned at the beginning of the representation of an object, this method reads that stream and creates an object that matches one of the types specified.

The default implementation of this method should call getContent() and screen the return type for a match of the suggested types.

Added in 1.3.

Java documentation for java.net.ContentHandler.getContent(java.net.URLConnection, java.lang.Class[]).

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