Java.Net.URLConnection Members

The members of Java.Net.URLConnection are listed below.

See Also: Inherited members from Java.Lang.Object

Protected Constructors

Creates a new URLConnection instance pointing to the resource specified by the given URL.
A constructor used when creating managed representations of JNI objects; called by the runtime.

Public Properties

AllowUserInteractionbool. Returns allowUserInteraction.
ConnectTimeoutint. Returns the connect timeout in milliseconds.
[read-only]
ContentJava.Lang.Object. Returns an object representing the content of the resource this URLConnection is connected to.
[read-only]
ContentEncodingstring. Returns the content encoding type specified by the response header field content-encoding or null if this field is not set.
[read-only]
ContentLengthint. Returns the content length in bytes specified by the response header field content-length or -1 if this field is not set or cannot be represented as an int.
[read-only]
ContentLengthLonglong. Documentation for this section has not yet been entered.
[read-only]
ContentTypestring. Returns the MIME-type of the content specified by the response header field content-type or null if type is unknown.
[read-only]
Datelong. Returns the timestamp when this response has been sent as a date in milliseconds since January 1, 1970 GMT or 0 if this timestamp is unknown.
static
DefaultAllowUserInteractionbool. Returns the default value of allowUserInteraction.
DefaultUseCachesbool. Returns the default setting whether this connection allows using caches.
DoInputbool. Returns the value of the option doInput which specifies whether this connection allows to receive data.
DoOutputbool. Returns the value of the option doOutput which specifies whether this connection allows to send data.
[read-only]
Expirationlong. Returns the timestamp when this response will be expired in milliseconds since January 1, 1970 GMT or 0 if this timestamp is unknown.
static
FileNameMapIFileNameMap. Returns the table which is used by all URLConnection instances to determine the MIME-type according to a file extension.
[read-only]
HeaderFieldsIDictionary<string, IList<string>>. Returns an unmodifiable map of the response-header fields and values.
IfModifiedSincelong. Returns the point of time since when the data must be modified to be transmitted.
[read-only]
InputStreamSystem.IO.Stream. Returns an InputStream for reading data from the resource pointed by this URLConnection.
[read-only]
LastModifiedlong. Returns the value of the response header field last-modified or 0 if this value is not set.
[read-only]
OutputStreamSystem.IO.Stream. Returns an OutputStream for writing data to this URLConnection.
[read-only]
PermissionJava.Security.Permission. Returns a Permission object representing all needed permissions to open this connection.
ReadTimeoutint. Returns the read timeout in milliseconds, or 0 if reads never timeout.
[read-only]
RequestPropertiesIDictionary<string, IList<string>>. Returns an unmodifiable map of general request properties used by this connection.
[read-only]
URLURL. Returns the URL represented by this URLConnection.
UseCachesbool. Returns the value of the flag which specifies whether this URLConnection allows to use caches.

Protected Properties

Connectedbool. Specifies whether this URLConnection is already connected to the remote resource.
[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
UrlURL. The URL which represents the remote target of this URLConnection.

Public Methods

AddRequestProperty(string, string)
Adds the given property to the request header.
abstract
Connect()
Opens a connection to the resource.
ConnectAsync() : System.Threading.Tasks.Task
Documentation for this section has not yet been entered.
GetContent(Java.Lang.Class[]) : Java.Lang.Object
Returns an object representing the content of the resource this URLConnection is connected to.
static
GetDefaultRequestProperty(string) : string
Returns null.
GetHeaderField(int) : string
Returns the header value at the field position pos or null if the header has fewer than pos fields.
GetHeaderField(string) : string
Returns the value of the header field specified by key or null if there is no field with this name.
GetHeaderFieldDate(string, long) : long
Returns the specified header value as a date in milliseconds since January 1, 1970 GMT.
GetHeaderFieldInt(string, int) : int
Returns the specified header value as a number.
GetHeaderFieldKey(int) : string
Returns the name of the header field at the given position posn or null if there are fewer than posn fields.
GetHeaderFieldLong(string, long) : long
Documentation for this section has not yet been entered.
GetRequestProperty(string) : string
Returns the value of the request header property specified by {code field} or null if there is no field with this name.
static
GuessContentTypeFromName(string) : string
Determines the MIME-type of the given resource url by resolving the filename extension with the internal FileNameMap.
static
GuessContentTypeFromStream(System.IO.Stream) : string
Determines the MIME-type of the resource represented by the input stream is by reading its first few characters.
static
SetContentHandlerFactory(IContentHandlerFactory)
Sets the internally used content handler factory.
static
SetDefaultRequestProperty(string, string)
Does nothing.
SetRequestProperty(string, string)
Sets the value of the specified request header field.