java的netconnection,URLConnection Class

URLConnection Class

Definition

Namespace:

Assembly:Mono.Android.dll

A connection to a URL for reading or writing.

In this article

[Android.Runtime.Register("java/net/URLConnection", ApiSince=1, DoNotGenerateAcw=true)]

public abstract class URLConnection : Java.Lang.Object

type URLConnection = class

inherit Object

Inheritance

URLConnection

Remarks

Portions of this page are modifications based on work created and shared by the

Constructors

A constructor used when creating managed representations of JNI objects; called by the runtime.

Creates a new URLConnection instance pointing to the resource

specified by the given URL.

Properties

Returns allowUserInteraction.

Returns the unique instance of Class that represents this

object's class.

(Inherited from Object)

Specifies whether this URLConnection is already connected to the

remote resource.

Returns the connect timeout in milliseconds.

Returns an object representing the content of the resource this URLConnection is connected to.

Returns the content encoding type specified by the response header field

content-encoding or null if this field is not set.

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.

Returns the MIME-type of the content specified by the response header field

content-type or null if type is unknown.

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.

Returns the default value of allowUserInteraction.

Returns the default setting whether this connection allows using caches.

Returns the value of the option doInput which specifies whether this

connection allows to receive data.

Returns the value of the option doOutput which specifies whether

this connection allows to send data.

Returns the timestamp when this response will be expired in milliseconds

since January 1, 1970 GMT or 0 if this timestamp is unknown.

Returns the table which is used by all URLConnection instances to

determine the MIME-type according to a file extension.

The handle to the underlying Android instance.

(Inherited from Object)

Returns an unmodifiable map of the response-header fields and values.

Returns the point of time since when the data must be modified to be

transmitted.

Returns an InputStream for reading data from the resource pointed by

this URLConnection.

Returns the value of the response header field last-modified or

0 if this value is not set.

Returns an OutputStream for writing data to this URLConnection.

Returns a Permission object representing all needed permissions to

open this connection.

Returns the read timeout in milliseconds, or 0 if reads never

timeout.

Returns an unmodifiable map of general request properties used by this

connection.

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

The URL which represents the remote target of this URLConnection.

Returns the URL represented by this URLConnection.

Returns the value of the flag which specifies whether this URLConnection allows to use caches.

Methods

Adds the given property to the request header.

Creates and returns a copy of this Object.

(Inherited from Object)

Opens a connection to the resource.

(Inherited from Object)

Compares this instance with the specified object and indicates if they

are equal.

(Inherited from Object)

Returns an object representing the content of the resource this URLConnection is connected to.

Returns an integer hash code for this object.

(Inherited from Object)

Returns the header value at the field position pos or null

if the header has fewer than pos fields.

Returns the value of the header field specified by key or null if there is no field with this name.

Returns the specified header value as a date in milliseconds since January

1, 1970 GMT.

Returns the specified header value as a number.

Returns the name of the header field at the given position posn or

null if there are fewer than posn fields.

Returns the value of the request header property specified by {code field}

or null if there is no field with this name.

Determines the MIME-type of the given resource url by resolving

the filename extension with the internal FileNameMap.

Determines the MIME-type of the resource represented by the input stream

is by reading its first few characters.

Invoked when the garbage collector has detected that this instance is no longer reachable.

(Inherited from Object)

Causes a thread which is waiting on this object's monitor (by means of

calling one of the wait() methods) to be woken up.

(Inherited from Object)

Causes all threads which are waiting on this object's monitor (by means

of calling one of the wait() methods) to be woken up.

(Inherited from Object)

Sets the internally used content handler factory.

Sets the value of the specified request header field.

Returns a string containing a concise, human-readable description of this

object.

(Inherited from Object)

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object.

(Inherited from Object)

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the

specified timeout expires.

(Inherited from Object)

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the

specified timeout expires.

(Inherited from Object)

Explicit Interface Implementations

Extension Methods

Applies to

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值