java.net.HttpURLConnection
which is used by JGit
| Modifier and Type | Field and Description |
|---|---|
| public static final int | HTTP_11_MOVED_PERM
HTTP 1.1 additional "permanent redirect" status code; value = 308. |
| public static final int | HTTP_11_MOVED_TEMP
HTTP 1.1 additional "temporary redirect" status code; value = 307. |
| public static final int | HTTP_FORBIDDEN
HttpURLConnection#HTTP_FORBIDDEN |
| public static final int | HTTP_MOVED_PERM
HttpURLConnection#HTTP_MOVED_PERM |
| public static final int | HTTP_MOVED_TEMP
HttpURLConnection#HTTP_MOVED_TEMP |
| public static final int | HTTP_NOT_AUTHORITATIVE
HttpURLConnection#HTTP_NOT_AUTHORITATIVE |
| public static final int | HTTP_NOT_FOUND
HttpURLConnection#HTTP_NOT_FOUND |
| public static final int | HTTP_OK
HttpURLConnection#HTTP_OK |
| public static final int | HTTP_SEE_OTHER
HttpURLConnection#HTTP_SEE_OTHER |
| public static final int | HTTP_UNAUTHORIZED
HttpURLConnection#HTTP_UNAUTHORIZED |
| Modifier and Type | Method and Description |
|---|---|
| public void | configure(KeyManager[]
the keymanager managing the key material used to authenticate
the local SSLSocket to its peer km, TrustManager[] the trustmanager responsible for managing the trust material
that is used when making trust decisions, and for deciding
whether credentials presented by a peer should be accepted. tm, SecureRandom the source of randomness for this generator or null. See
random)javax.Configure the connection so that it can be used for https communication. |
| public void | |
| public int | Returns: the content length of the resource that this connection's URL references,-1 if the content length is not known, or if
the content length is greater than Integer.MAX_VALUE.Get content length |
| public String | Returns: the content type of the resource that the URL references, ornull if not known.Get content type |
| public String | Returns: the value of the named header field, ornull if
there is no such field in the header.the name of a header field. name)Get header field. |
| public Map | |
| public List | Returns: the list of values of the named header fieldthe name of a header field. name)Get all values of given header field. |
| public InputStream | |
| public OutputStream | |
| public String | |
| public int | |
| public String | |
| public URL | |
| public void | setChunkedStreamingMode(int
The number of bytes to write in each chunk. If chunklen is
less than or equal to zero, a default value will be used. chunklen)Set chunked streaming mode |
| public void | setConnectTimeout(int
an timeout)int that specifies the connect timeout value
in millisecondsSet connect timeout |
| public void | |
| public void | setFixedLengthStreamingMode(int
The number of bytes which will be written to the OutputStream. contentLength)Set fixed length streaming mode |
| public void | setHostnameVerifier(HostnameVerifier
a hostnameverifier)javax. object.Set the |
| public void | setInstanceFollowRedirects(boolean
a followRedirects)boolean indicating whether or not to follow
HTTP redirects.Set whether or not to follow HTTP redirects. |
| public void | setReadTimeout(int
an timeout)int that specifies the timeout value to be
used in millisecondsSet read timeout |
| public void | |
| public void | setRequestProperty(String
the keyword by which the request is known (e.g., "
key, String Accept").the value associated with it. value)Set request property |
| public void | setUseCaches(boolean
a usecaches)boolean indicating whether or not to allow
cachingSet if to use caches |
| public boolean |
| HTTP_11_MOVED_PERM | back to summary |
|---|---|
| public static final int HTTP_11_MOVED_PERM HTTP 1.1 additional "permanent redirect" status code; value = 308.
| |
| HTTP_11_MOVED_TEMP | back to summary |
|---|---|
| public static final int HTTP_11_MOVED_TEMP HTTP 1.1 additional "temporary redirect" status code; value = 307.
| |
| HTTP_FORBIDDEN | back to summary |
|---|---|
| public static final int HTTP_FORBIDDEN HttpURLConnection#HTTP_FORBIDDEN
| |
| HTTP_MOVED_PERM | back to summary |
|---|---|
| public static final int HTTP_MOVED_PERM HttpURLConnection#HTTP_MOVED_PERM
| |
| HTTP_MOVED_TEMP | back to summary |
|---|---|
| public static final int HTTP_MOVED_TEMP HttpURLConnection#HTTP_MOVED_TEMP
| |
| HTTP_NOT_AUTHORITATIVE | back to summary |
|---|---|
| public static final int HTTP_NOT_AUTHORITATIVE HttpURLConnection#HTTP_NOT_AUTHORITATIVE
| |
| HTTP_NOT_FOUND | back to summary |
|---|---|
| public static final int HTTP_NOT_FOUND HttpURLConnection#HTTP_NOT_FOUND
| |
| HTTP_OK | back to summary |
|---|---|
| public static final int HTTP_OK HttpURLConnection#HTTP_OK
| |
| HTTP_SEE_OTHER | back to summary |
|---|---|
| public static final int HTTP_SEE_OTHER HttpURLConnection#HTTP_SEE_OTHER
| |
| HTTP_UNAUTHORIZED | back to summary |
|---|---|
| public static final int HTTP_UNAUTHORIZED HttpURLConnection#HTTP_UNAUTHORIZED
| |
| configure | back to summary |
|---|---|
| public void configure(KeyManager[] km, TrustManager[] tm, SecureRandom random) throws NoSuchAlgorithmException, KeyManagementException Configure the connection so that it can be used for https communication.
| |
| connect | back to summary |
|---|---|
| public void connect() throws IOException Connect
| |
| getContentLength | back to summary |
|---|---|
| public int getContentLength() Get content length
| |
| getContentType | back to summary |
|---|---|
| public String getContentType() Get content type
| |
| getHeaderField | back to summary |
|---|---|
| public String getHeaderField(String name) Get header field. According to
RFC 2616
header field names are case insensitive. Header fields defined
as a comma separated list can have multiple header fields with the same
field name. This method only returns one of these header fields. If you
want the union of all values of all multiple header fields with the same
field name then use
| |
| getHeaderFields | back to summary |
|---|---|
| public Map Get map of header fields
| |
| getHeaderFields | back to summary |
|---|---|
| public List Get all values of given header field. According to RFC 2616 header field names are case insensitive. Header fields defined as a comma separated list can have multiple header fields with the same field name. This method does not validate if the given header field is defined as a comma separated list. | |
| getInputStream | back to summary |
|---|---|
| public InputStream getInputStream() throws IOException Get input stream
| |
| getOutputStream | back to summary |
|---|---|
| public OutputStream getOutputStream() throws IOException Get output stream
| |
| getRequestMethod | back to summary |
|---|---|
| public String getRequestMethod() Get request method
| |
| getResponseCode | back to summary |
|---|---|
| public int getResponseCode() throws IOException Get response code
| |
| getResponseMessage | back to summary |
|---|---|
| public String getResponseMessage() throws IOException Get response message
| |
| getURL | back to summary |
|---|---|
| public URL getURL() Get URL
| |
| setChunkedStreamingMode | back to summary |
|---|---|
| public void setChunkedStreamingMode(int chunklen) Set chunked streaming mode
| |
| setConnectTimeout | back to summary |
|---|---|
| public void setConnectTimeout(int timeout) Set connect timeout
| |
| setDoOutput | back to summary |
|---|---|
| public void setDoOutput(boolean dooutput) Set if to do output
| |
| setFixedLengthStreamingMode | back to summary |
|---|---|
| public void setFixedLengthStreamingMode(int contentLength) Set fixed length streaming mode
| |
| setHostnameVerifier | back to summary |
|---|---|
| public void setHostnameVerifier(HostnameVerifier hostnameverifier) throws NoSuchAlgorithmException, KeyManagementException Set the
| |
| setInstanceFollowRedirects | back to summary |
|---|---|
| public void setInstanceFollowRedirects(boolean followRedirects) Set whether or not to follow HTTP redirects.
| |
| setReadTimeout | back to summary |
|---|---|
| public void setReadTimeout(int timeout) Set read timeout
| |
| setRequestMethod | back to summary |
|---|---|
| public void setRequestMethod(String method) throws ProtocolException Set request method
| |
| setRequestProperty | back to summary |
|---|---|
| public void setRequestProperty(String key, String value) Set request property
| |
| setUseCaches | back to summary |
|---|---|
| public void setUseCaches(boolean usecaches) Set if to use caches
| |
| usingProxy | back to summary |
|---|---|
| public boolean usingProxy() Whether we use a proxy
| |