Java.Net.URLConnection.GetContent Method
Returns an object representing the content of the resource this URLConnection is connected to.

Syntax

[Android.Runtime.Register("getContent", "([Ljava/lang/Class;)Ljava/lang/Object;", "GetGetContent_arrayLjava_lang_Class_Handler")]
public virtual Java.Lang.Object GetContent (Java.Lang.Class[] types)

Parameters

types
the list of acceptable content types.

Returns

Documentation for this section has not yet been entered.

Exceptions

TypeReason
Java.IO.IOExceptionif an error occurs obtaining the content.

Remarks

Returns an object representing the content of the resource this URLConnection is connected to. First, it attempts to get the content type from the method getContentType() which looks at the response header field "Content-Type". If none is found it will guess the content type from the filename extension. If that fails the stream itself will be used to guess the content type. The content type must match with one of the list types.

[Android Documentation]

Requirements

Namespace: Java.Net
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1