Fields
protected
boolean allowUserInteraction
[Inherited From URLConnection]
If
true
, this
URL
is being examined in
a context in which it makes sense to allow user interactions such
as popping up an authentication dialog.
protected
int chunkLength
The chunk-length when using chunked encoding streaming mode for output.
The chunk-length when using chunked encoding streaming mode for output.
A value of
-1
means chunked encoding is disabled for output.
Since:
1.5
protected
boolean connected
[Inherited From URLConnection]
If
false
, this connection object has not created a
communications link to the specified URL.
If
false
, this connection object has not created a
communications link to the specified URL. If
true
,
the communications link has been established.
protected
boolean doInput
[Inherited From URLConnection]
This variable is set by the
setDoInput
method.
This variable is set by the
setDoInput
method. Its
value is returned by the
getDoInput
method.
A URL connection can be used for input and/or output. Setting the
doInput
flag to true
indicates that
the application intends to read data from the URL connection.
The default value of this field is true
.
See Also:
URLConnection.getDoInput()
,
URLConnection.setDoInput(boolean)
,
protected
boolean doOutput
[Inherited From URLConnection]
This variable is set by the
setDoOutput
method.
This variable is set by the
setDoOutput
method. Its
value is returned by the
getDoOutput
method.
A URL connection can be used for input and/or output. Setting the
doOutput
flag to true
indicates
that the application intends to write data to the URL connection.
The default value of this field is false
.
See Also:
URLConnection.getDoOutput()
,
URLConnection.setDoOutput(boolean)
,
protected
int fixedContentLength
The fixed content-length when using fixed-length streaming mode.
The fixed content-length when using fixed-length streaming mode.
A value of
-1
means fixed-length streaming mode is disabled
for output.
Since:
1.5
publicfinalstatic
int HTTP_ACCEPTED
= "202"
HTTP Status-Code 202: Accepted.
publicfinalstatic
int HTTP_BAD_GATEWAY
= "502"
HTTP Status-Code 502: Bad Gateway.
publicfinalstatic
int HTTP_BAD_METHOD
= "405"
HTTP Status-Code 405: Method Not Allowed.
publicfinalstatic
int HTTP_BAD_REQUEST
= "400"
HTTP Status-Code 400: Bad Request.
publicfinalstatic
int HTTP_CLIENT_TIMEOUT
= "408"
HTTP Status-Code 408: Request Time-Out.
publicfinalstatic
int HTTP_CONFLICT
= "409"
HTTP Status-Code 409: Conflict.
publicfinalstatic
int HTTP_CREATED
= "201"
HTTP Status-Code 201: Created.
publicfinalstatic
int HTTP_ENTITY_TOO_LARGE
= "413"
HTTP Status-Code 413: Request Entity Too Large.
publicfinalstatic
int HTTP_FORBIDDEN
= "403"
HTTP Status-Code 403: Forbidden.
publicfinalstatic
int HTTP_GATEWAY_TIMEOUT
= "504"
HTTP Status-Code 504: Gateway Timeout.
publicfinalstatic
int HTTP_GONE
= "410"
HTTP Status-Code 410: Gone.
publicfinalstatic
int HTTP_INTERNAL_ERROR
= "500"
HTTP Status-Code 500: Internal Server Error.
publicfinalstatic
int HTTP_LENGTH_REQUIRED
= "411"
HTTP Status-Code 411: Length Required.
publicfinalstatic
int HTTP_MOVED_PERM
= "301"
HTTP Status-Code 301: Moved Permanently.
publicfinalstatic
int HTTP_MOVED_TEMP
= "302"
HTTP Status-Code 302: Temporary Redirect.
publicfinalstatic
int HTTP_MULT_CHOICE
= "300"
HTTP Status-Code 300: Multiple Choices.
publicfinalstatic
int HTTP_NO_CONTENT
= "204"
HTTP Status-Code 204: No Content.
publicfinalstatic
int HTTP_NOT_ACCEPTABLE
= "406"
HTTP Status-Code 406: Not Acceptable.
publicfinalstatic
int HTTP_NOT_AUTHORITATIVE
= "203"
HTTP Status-Code 203: Non-Authoritative Information.
publicfinalstatic
int HTTP_NOT_FOUND
= "404"
HTTP Status-Code 404: Not Found.
publicfinalstatic
int HTTP_NOT_IMPLEMENTED
= "501"
HTTP Status-Code 501: Not Implemented.
publicfinalstatic
int HTTP_NOT_MODIFIED
= "304"
HTTP Status-Code 304: Not Modified.
publicfinalstatic
int HTTP_OK
= "200"
HTTP Status-Code 200: OK.
publicfinalstatic
int HTTP_PARTIAL
= "206"
HTTP Status-Code 206: Partial Content.
publicfinalstatic
int HTTP_PAYMENT_REQUIRED
= "402"
HTTP Status-Code 402: Payment Required.
publicfinalstatic
int HTTP_PRECON_FAILED
= "412"
HTTP Status-Code 412: Precondition Failed.
publicfinalstatic
int HTTP_PROXY_AUTH
= "407"
HTTP Status-Code 407: Proxy Authentication Required.
publicfinalstatic
int HTTP_REQ_TOO_LONG
= "414"
HTTP Status-Code 414: Request-URI Too Large.
publicfinalstatic
int HTTP_RESET
= "205"
HTTP Status-Code 205: Reset Content.
publicfinalstatic
int HTTP_SEE_OTHER
= "303"
HTTP Status-Code 303: See Other.
@Deprecated
publicfinalstatic
int HTTP_SERVER_ERROR
= "500"
HTTP Status-Code 500: Internal Server Error.
publicfinalstatic
int HTTP_UNAUTHORIZED
= "401"
HTTP Status-Code 401: Unauthorized.
publicfinalstatic
int HTTP_UNAVAILABLE
= "503"
HTTP Status-Code 503: Service Unavailable.
publicfinalstatic
int HTTP_UNSUPPORTED_TYPE
= "415"
HTTP Status-Code 415: Unsupported Media Type.
publicfinalstatic
int HTTP_USE_PROXY
= "305"
HTTP Status-Code 305: Use Proxy.
publicfinalstatic
int HTTP_VERSION
= "505"
HTTP Status-Code 505: HTTP Version Not Supported.
protected
long ifModifiedSince
[Inherited From URLConnection]
Some protocols support skipping the fetching of the object unless
the object has been modified more recently than a certain time.
Some protocols support skipping the fetching of the object unless
the object has been modified more recently than a certain time.
A nonzero value gives a time as the number of milliseconds since
January 1, 1970, GMT. The object is fetched only if it has been
modified more recently than that time.
This variable is set by the setIfModifiedSince
method. Its value is returned by the
getIfModifiedSince
method.
The default value of this field is 0
, indicating
that the fetching must always occur.
See Also:
URLConnection.getIfModifiedSince()
,
URLConnection.setIfModifiedSince(long)
,
protected
boolean instanceFollowRedirects
If
true
, the protocol will automatically follow redirects.
protected
String method
The HTTP method (GET,POST,PUT,etc.).
protected
int responseCode
An
int
representing the three digit HTTP Status-Code.
An
int
representing the three digit HTTP Status-Code.
- 1xx: Informational
- 2xx: Success
- 3xx: Redirection
- 4xx: Client Error
- 5xx: Server Error
protected
String responseMessage
The HTTP response message.
protected
URL url
[Inherited From URLConnection]
The URL represents the remote object on the World Wide Web to
which this connection is opened.
The URL represents the remote object on the World Wide Web to
which this connection is opened.
The value of this field can be accessed by the
getURL
method.
The default value of this variable is the value of the URL
argument in the URLConnection
constructor.
See Also:
URLConnection.getURL()
,
URLConnection.url
,
protected
boolean useCaches
[Inherited From URLConnection]
If
true
, the protocol is allowed to use caching
whenever it can.