Example usage for Java javax.net.ssl HttpsURLConnection fields, constructors, methods, implement or subclass
The text is from its open source code.
void | addRequestProperty(String key, String value) Adds a general request property specified by a key-value pair. |
void | connect() Opens a communications link to the resource referenced by this URL, if such a connection has not already been established. |
void | disconnect() Indicates that other requests to the server are unlikely in the near future. |
String | getCipherSuite() Returns the cipher suite in use on this connection. |
int | getConnectTimeout() Returns setting for connect timeout. |
Object | getContent() Retrieves the contents of this URL connection. |
String | getContentEncoding() Returns the value of the content-encoding header field. |
int | getContentLength() Returns the value of the content-length header field. |
long | getContentLengthLong() Returns the value of the content-length header field as a long. |
String | getContentType() Returns the value of the content-type header field. |
HostnameVerifier | getDefaultHostnameVerifier() Gets the default HostnameVerifier that is inherited by new instances of this class. |
SSLSocketFactory | getDefaultSSLSocketFactory() Gets the default static SSLSocketFactory that is inherited by new instances of this class. |
boolean | getDoOutput() Returns the value of this URLConnection 's doOutput flag. |
InputStream | getErrorStream() Returns the error stream if the connection failed but the server sent useful data nonetheless. |
String | getHeaderField(int n) Returns the value for the n th header field. |
String | getHeaderFieldKey(int n) Returns the key for the n th header field. |
Map | getHeaderFields() Returns an unmodifiable Map of the header fields. |
HostnameVerifier | getHostnameVerifier() Gets the HostnameVerifier in place on this instance. |
InputStream | getInputStream() Returns an input stream that reads from this open connection. |
java.security.cert.Certificate[] | getLocalCertificates() Returns the certificate(s) that were sent to the server during handshaking. |
OutputStream | getOutputStream() Returns an output stream that writes to this connection. |
int | getReadTimeout() Returns setting for read timeout. |
String | getRequestMethod() Get the request method. |
Map | getRequestProperties() Returns an unmodifiable Map of general request properties for this connection. |
String | getRequestProperty(String key) Returns the value of the named general request property for this connection. |
int | getResponseCode() Gets the status code from an HTTP response message. |
String | getResponseMessage() Gets the HTTP response message, if any, returned along with the response code from a server. |
java.security.cert.Certificate[] | getServerCertificates() Returns the server's certificate chain which was established as part of defining the session. |
SSLSocketFactory | getSSLSocketFactory() Gets the SSL socket factory to be used when creating sockets for secure https URL connections. |
URL | getURL() Returns the value of this URLConnection 's URL field. |
void | setAllowUserInteraction(boolean allowuserinteraction) Set the value of the allowUserInteraction field of this URLConnection . |
void | setChunkedStreamingMode(int chunklen) This method is used to enable streaming of a HTTP request body without internal buffering, when the content length is not known in advance. |
void | setConnectTimeout(int timeout) Sets a specified timeout value, in milliseconds, to be used when opening a communications link to the resource referenced by this URLConnection. |
void | setDefaultHostnameVerifier(HostnameVerifier v) Sets the default HostnameVerifier inherited by a new instance of this class. |
void | setDefaultSSLSocketFactory(SSLSocketFactory sf) Sets the default SSLSocketFactory inherited by new instances of this class. |
void | setDefaultUseCaches(boolean defaultusecaches) Sets the default value of the useCaches field to the specified value. |
void | setDoInput(boolean doinput) Sets the value of the doInput field for this URLConnection to the specified value. |
void | setDoOutput(boolean dooutput) Sets the value of the doOutput field for this URLConnection to the specified value. |
void | setFixedLengthStreamingMode(int contentLength) This method is used to enable streaming of a HTTP request body without internal buffering, when the content length is known in advance. |
void | setHostnameVerifier(HostnameVerifier v) Sets the HostnameVerifier for this instance. |
void | setInstanceFollowRedirects(boolean followRedirects) Sets whether HTTP redirects (requests with response code 3xx) should be automatically followed by this HttpURLConnection instance. |
void | setReadTimeout(int timeout) Sets the read timeout to a specified timeout, in milliseconds. |
void | setRequestMethod(String method) Set the method for the URL request, one of:
|
void | setRequestProperty(String key, String value) Sets the general request property. |
void | setSSLSocketFactory(SSLSocketFactory sf) Sets the SSLSocketFactory to be used when this instance creates sockets for secure https URL connections. |
void | setUseCaches(boolean usecaches) Sets the value of the useCaches field of this URLConnection to the specified value. |
String | toString() Returns a String representation of this URL connection. |