nl.nikhef.slcshttps.trust
Class HttxURLConnection

java.lang.Object
  extended by java.net.URLConnection
      extended by java.net.HttpURLConnection
          extended by javax.net.ssl.HttpsURLConnection
              extended by nl.nikhef.slcshttps.trust.HttxURLConnection

public class HttxURLConnection
extends HttpsURLConnection

This class extends a HttpsURLConnection that can use a TrustManager that not only can check the certificate chain but also the hostname against the server certificate. More details can be found in the package description.
In addition it can also warn the user when his/her client certificate is about to expire or has already expired. Communication about this is handled by an implementation of HttxURLConnection.HttxClientCommunicator. An implementation using just stdio is given by HttxURLConnection.StdioComm. It can be configured using the following system properties:

HttxURLConnection is implemented as a delegate class for HttpsURLConnection since that class is abstract while its actual implementation is kept internal in the JDK API. Note that undocumented overriding methods just call the corresponding overridden method of the implementation, see the overridden methods for documentation.

Version:
0.1
Author:
Mischa Sallé

Nested Class Summary
static interface HttxURLConnection.HttxClientCommunicator
          Interface for HttxURLConnection communication about client certificate expiration.
(package private) static class HttxURLConnection.StdioComm
          This Implementation uses only stdio/stderr for I/O.
 
Field Summary
private static boolean clientExpireAcknowl
          Whether a warning has been given about expiry.
private static Date clientExpireDate
          Expiry time of client side certificate (null for unset), can be set using setClientExpireDate(Date).
private static boolean clientExpireWarn
          Whether we want warnings, set at class initialization using the property "nl.nikhef.slcshttps.httxclientwarn" or using setExpire(String).
private static boolean clientExpireWarnAcknowl
          Whether a warning has been given about imminent expiry.
private static long clientExpireWarnTime
          Time in milliseconds before expiry to warn the user, use 0 for warning only after actual expiry, set at class initialization using the property "nl.nikhef.slcshttps.httxclientwarntime" or using setExpireWarnTime(String).
private static HttxURLConnection.HttxClientCommunicator comm
          The HttxURLConnection.HttxClientCommunicator used for communication about client certificate expiry, can be set using setCommunicator(String).
private static String COMMPROP
          Name of property that sets the type of communicator: "nl.nikhef.slcshttps.comm", can be overridden using setCommunicator(String).
private static String commString
          describes the type of communicator in use, initialized using the value of property "nl.nikhef.slcshttps.comm" by setCommunicator(String).
private static SSLSocketFactory defaultSSLSocketFactory
          Default SSLSocketFactory, is initialized with an empty set of KeyManager and a TrustManagerImpl.
private static String EXPIREPROP
          Name of property that determines whether to warn: "nl.nikhef.slcshttps.httxclientwarn", default is true, see also EXPIRETIMEPROP, can be overridden using setExpire(String).
private static String EXPIRETIMEPROP
          Name of property that determines when to give an 'about-to-expire' warning: "nl.nikhef.slcshttps.httxclientwarntime", value is number of seconds; when it is unspecified or invalid, 0 is assumed and only a warning upon actual expiry is given, see also EXPIREPROP, can be overridden using setExpireWarnTime(String).
private  String hostName
          hostname part of the URL.
private static HostnameVerifier hostVerifier
          Default HostnameVerifier, is initialized to a trivial one, since all functionality is in the TrustManagerImpl.
private  HttpURLConnection httpImpl
          Masked HttpURLConnection or HttpsURLConnection.
private  int portNumber
          portnumber of the URL.
private  boolean ssl
          whether this is a HTTPS or HTTP connection.
private  URL url
          URL of the connection.
 
Fields inherited from class javax.net.ssl.HttpsURLConnection
hostnameVerifier
 
Fields inherited from class java.net.HttpURLConnection
chunkLength, fixedContentLength, HTTP_ACCEPTED, HTTP_BAD_GATEWAY, HTTP_BAD_METHOD, HTTP_BAD_REQUEST, HTTP_CLIENT_TIMEOUT, HTTP_CONFLICT, HTTP_CREATED, HTTP_ENTITY_TOO_LARGE, HTTP_FORBIDDEN, HTTP_GATEWAY_TIMEOUT, HTTP_GONE, HTTP_INTERNAL_ERROR, HTTP_LENGTH_REQUIRED, HTTP_MOVED_PERM, HTTP_MOVED_TEMP, HTTP_MULT_CHOICE, HTTP_NO_CONTENT, HTTP_NOT_ACCEPTABLE, HTTP_NOT_AUTHORITATIVE, HTTP_NOT_FOUND, HTTP_NOT_IMPLEMENTED, HTTP_NOT_MODIFIED, HTTP_OK, HTTP_PARTIAL, HTTP_PAYMENT_REQUIRED, HTTP_PRECON_FAILED, HTTP_PROXY_AUTH, HTTP_REQ_TOO_LONG, HTTP_RESET, HTTP_SEE_OTHER, HTTP_SERVER_ERROR, HTTP_UNAUTHORIZED, HTTP_UNAVAILABLE, HTTP_UNSUPPORTED_TYPE, HTTP_USE_PROXY, HTTP_VERSION, instanceFollowRedirects, method, responseCode, responseMessage
 
Fields inherited from class java.net.URLConnection
allowUserInteraction, connected, doInput, doOutput, ifModifiedSince, useCaches
 
Constructor Summary
HttxURLConnection(HttpURLConnection httpConnection)
          Constructs a HttxURLConnection from given HttpURLConnection or HttpsURLConnection (a subclass of the former).
HttxURLConnection(URL url)
          Constructs a HttxURLConnection to url.
 
Method Summary
 void addRequestProperty(String arg0, String arg1)
           
static boolean checkClientExpire()
          Static method checking the client certificate, using status flags to determine whether to warn the user the certificate expiry is imminent, is already expired etc.
 void connect()
          Connects an opened HttxURLConnection.
 void disconnect()
          Disconnects an opened HttxURLConnection, which also resets the hostname and portnumber for the TrustManagerImpl.
 boolean equals(Object arg0)
           
 boolean getAllowUserInteraction()
           
 String getCipherSuite()
           
static Date getClientExpireDate()
          Method to get the expiry Date of the client side certificate, null for no certificate.
static String getCommunicator()
          Returns the type of HttxURLConnection.HttxClientCommunicator used for user interaction.
 int getConnectTimeout()
           
 Object getContent()
           
 Object getContent(Class[] arg0)
           
 String getContentEncoding()
           
 int getContentLength()
           
 String getContentType()
           
 long getDate()
           
static boolean getDefaultAllowUserInteraction()
          Calls URLConnection.getDefaultAllowUserInteraction().
static HostnameVerifier getDefaultHostnameVerifier()
          Method to get the default HostnameVerifier for HttxURLConnection.
static SSLSocketFactory getDefaultSSLSocketFactory()
          Method to get the default SSLSocketFactory for HttxURLConnection.
 boolean getDefaultUseCaches()
           
 boolean getDoInput()
           
 boolean getDoOutput()
           
 InputStream getErrorStream()
           
 long getExpiration()
           
static boolean getExpire()
          Returns whether to check for client certificate expiry and warn about it.
static long getExpireWarnTime()
          Returns the number of milliseconds before actual expiry when a warning about imminent expiry of the client certificate is given.
static FileNameMap getFileNameMap()
          Calls URLConnection.getFileNameMap().
static boolean getFollowRedirects()
          Calls HttpURLConnection.getFollowRedirects().
 String getHeaderField(int arg0)
           
 String getHeaderField(String arg0)
           
 long getHeaderFieldDate(String arg0, long arg1)
           
 int getHeaderFieldInt(String arg0, int arg1)
           
 String getHeaderFieldKey(int arg0)
           
 Map<String,List<String>> getHeaderFields()
           
 HostnameVerifier getHostnameVerifier()
          Method to get the HostnameVerifier for HttxURLConnection.
 long getIfModifiedSince()
           
 InputStream getInputStream()
           
 boolean getInstanceFollowRedirects()
           
 long getLastModified()
           
 Certificate[] getLocalCertificates()
           
 Principal getLocalPrincipal()
           
 OutputStream getOutputStream()
           
 Principal getPeerPrincipal()
           
 Permission getPermission()
           
 int getReadTimeout()
           
 String getRequestMethod()
           
 Map<String,List<String>> getRequestProperties()
           
 String getRequestProperty(String arg0)
           
 int getResponseCode()
           
 String getResponseMessage()
           
 Certificate[] getServerCertificates()
           
 SSLSocketFactory getSSLSocketFactory()
           
 URL getURL()
           
 boolean getUseCaches()
           
static String guessContentTypeFromName(String arg0)
          Calls URLConnection.guessContentTypeFromName(String).
static String guessContentTypeFromStream(InputStream arg0)
          Calls URLConnection.guessContentTypeFromStream(InputStream).
 int hashCode()
           
static HttxURLConnection openConnection(URL url)
          Creates and returns a new HttxURLConnection for given url.
 void setAllowUserInteraction(boolean arg0)
           
 void setChunkedStreamingMode(int arg0)
           
static void setClientExpireDate(Date date)
          Method to set the expiry Date of the client side certificate, null for no certificate.
static String setCommunicator(String commInput)
          Sets the type of HttxURLConnection.HttxClientCommunicator based on commInput.
 void setConnectTimeout(int arg0)
           
static void setContentHandlerFactory(ContentHandlerFactory arg0)
          Calls URLConnection.setContentHandlerFactory(ContentHandlerFactory).
static void setDefaultAllowUserInteraction(boolean arg0)
          Calls URLConnection.setDefaultAllowUserInteraction(boolean).
static void setDefaultHostnameVerifier(HostnameVerifier hostnameVerifier)
          Empty setter method, in order to override the method.
static void setDefaultSSLSocketFactory(SSLSocketFactory sslSocketFactory)
          Sets the default SSLSocketFactory for HttxURLConnection.
 void setDefaultUseCaches(boolean arg0)
           
 void setDoInput(boolean arg0)
           
 void setDoOutput(boolean arg0)
           
static void setExpire(String setString)
          Sets whether to check for client certificate expiry and warn about it.
static void setExpireWarnTime(String timeString)
          Sets the time before expiry of a client certificate to give a warning.
static void setFileNameMap(FileNameMap arg0)
          Calls URLConnection.setFileNameMap(FileNameMap).
 void setFixedLengthStreamingMode(int arg0)
           
static void setFollowRedirects(boolean arg0)
          Calls HttpURLConnection.setFollowRedirects(boolean).
 void setHostnameVerifier(HostnameVerifier hostnameVerifier)
          Empty setter method, in order to override the method.
 void setIfModifiedSince(long arg0)
           
 void setInstanceFollowRedirects(boolean arg0)
           
 void setReadTimeout(int arg0)
           
 void setRequestMethod(String arg0)
           
 void setRequestProperty(String arg0, String arg1)
           
 void setSSLSocketFactory(SSLSocketFactory arg0)
           
 void setUseCaches(boolean arg0)
           
 String toString()
           
 boolean usingProxy()
           
 
Methods inherited from class java.net.URLConnection
getDefaultRequestProperty, setDefaultRequestProperty
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

httpImpl

private HttpURLConnection httpImpl
Masked HttpURLConnection or HttpsURLConnection.


defaultSSLSocketFactory

private static SSLSocketFactory defaultSSLSocketFactory
Default SSLSocketFactory, is initialized with an empty set of KeyManager and a TrustManagerImpl.


clientExpireWarn

private static boolean clientExpireWarn
Whether we want warnings, set at class initialization using the property "nl.nikhef.slcshttps.httxclientwarn" or using setExpire(String).


clientExpireWarnTime

private static long clientExpireWarnTime
Time in milliseconds before expiry to warn the user, use 0 for warning only after actual expiry, set at class initialization using the property "nl.nikhef.slcshttps.httxclientwarntime" or using setExpireWarnTime(String).


EXPIREPROP

private static final String EXPIREPROP
Name of property that determines whether to warn: "nl.nikhef.slcshttps.httxclientwarn", default is true, see also EXPIRETIMEPROP, can be overridden using setExpire(String).

See Also:
Constant Field Values

EXPIRETIMEPROP

private static final String EXPIRETIMEPROP
Name of property that determines when to give an 'about-to-expire' warning: "nl.nikhef.slcshttps.httxclientwarntime", value is number of seconds; when it is unspecified or invalid, 0 is assumed and only a warning upon actual expiry is given, see also EXPIREPROP, can be overridden using setExpireWarnTime(String).

See Also:
Constant Field Values

COMMPROP

private static final String COMMPROP
Name of property that sets the type of communicator: "nl.nikhef.slcshttps.comm", can be overridden using setCommunicator(String).

See Also:
Constant Field Values

clientExpireDate

private static Date clientExpireDate
Expiry time of client side certificate (null for unset), can be set using setClientExpireDate(Date).


clientExpireWarnAcknowl

private static boolean clientExpireWarnAcknowl
Whether a warning has been given about imminent expiry.


clientExpireAcknowl

private static boolean clientExpireAcknowl
Whether a warning has been given about expiry.


commString

private static String commString
describes the type of communicator in use, initialized using the value of property "nl.nikhef.slcshttps.comm" by setCommunicator(String).


comm

private static HttxURLConnection.HttxClientCommunicator comm
The HttxURLConnection.HttxClientCommunicator used for communication about client certificate expiry, can be set using setCommunicator(String).


hostVerifier

private static HostnameVerifier hostVerifier
Default HostnameVerifier, is initialized to a trivial one, since all functionality is in the TrustManagerImpl.


url

private URL url
URL of the connection.


hostName

private String hostName
hostname part of the URL.


portNumber

private int portNumber
portnumber of the URL.


ssl

private boolean ssl
whether this is a HTTPS or HTTP connection.

Constructor Detail

HttxURLConnection

public HttxURLConnection(HttpURLConnection httpConnection)
                  throws IOException
Constructs a HttxURLConnection from given HttpURLConnection or HttpsURLConnection (a subclass of the former). If this is a SSL connection (i.e. Https) it sets the hostname and portnumber of the URL into the static TrustManagerImpl fields. The preferred way is to call the static method openConnection(URL). We like to have the constructor public instead of protected: we do not have the option to cast the object returned by URL.openConnection() since that will be a JDK internal implementation of e.g. HttpsURLConnection; however, we can use the constructor to construct a new HttxURLConnection from such an object.

Parameters:
httpConnection - HttpURLConnection to construct a HttxURLConnection from.
Throws:
IOException - in case of error, including expired client certificate.
See Also:
openConnection(URL)

HttxURLConnection

public HttxURLConnection(URL url)
                  throws IOException
Constructs a HttxURLConnection to url. The preferred way is to call the static method openConnection(URL).

Parameters:
url - URL to open a connection to.
Throws:
IOException
See Also:
HttxURLConnection(HttpURLConnection), openConnection(URL)
Method Detail

openConnection

public static HttxURLConnection openConnection(URL url)
                                        throws IOException
Creates and returns a new HttxURLConnection for given url. This is the preferred method to open the connection.

Parameters:
url - URL to open a connection to.
Returns:
HttpxURLConnection to url
Throws:
IOException - upon error

connect

public void connect()
             throws IOException
Connects an opened HttxURLConnection. Note that it is not necessary to explicitly call URLConnection.connect(), it will automatically connect when starting I/O to it. This method will set (again) the hostname and portnumber of the TrustManagerImpl, which will not happen when it is connected automatically.

Specified by:
connect in class URLConnection
Throws:
IOException - upon error

disconnect

public void disconnect()
Disconnects an opened HttxURLConnection, which also resets the hostname and portnumber for the TrustManagerImpl.

Specified by:
disconnect in class HttpURLConnection

setDefaultSSLSocketFactory

public static void setDefaultSSLSocketFactory(SSLSocketFactory sslSocketFactory)
Sets the default SSLSocketFactory for HttxURLConnection. Note that this does not set the default SSLSocketFactory for HttpsURLConnection.

Parameters:
sslSocketFactory - will be set as default.
See Also:
getDefaultSSLSocketFactory()

getDefaultSSLSocketFactory

public static SSLSocketFactory getDefaultSSLSocketFactory()
Method to get the default SSLSocketFactory for HttxURLConnection. Note that this is different from the default SSLSocketFactory for HttpsURLConnection.

Returns:
default SSLSocketFactory
See Also:
setDefaultSSLSocketFactory(SSLSocketFactory)

setHostnameVerifier

public void setHostnameVerifier(HostnameVerifier hostnameVerifier)
Empty setter method, in order to override the method.

Overrides:
setHostnameVerifier in class HttpsURLConnection
Parameters:
hostnameVerifier - ignored.
See Also:
getHostnameVerifier().

setDefaultHostnameVerifier

public static void setDefaultHostnameVerifier(HostnameVerifier hostnameVerifier)
Empty setter method, in order to override the method.

Parameters:
hostnameVerifier - ignored.
See Also:
getDefaultHostnameVerifier().

getHostnameVerifier

public HostnameVerifier getHostnameVerifier()
Method to get the HostnameVerifier for HttxURLConnection. This is actually the same as returned by getDefaultHostnameVerifier() since we do not implement setter methods.

Overrides:
getHostnameVerifier in class HttpsURLConnection
Returns:
HostnameVerifier used by HttxURLConnection.
See Also:
getDefaultHostnameVerifier()., setHostnameVerifier(HostnameVerifier).

getDefaultHostnameVerifier

public static HostnameVerifier getDefaultHostnameVerifier()
Method to get the default HostnameVerifier for HttxURLConnection. This is actually the same as returned by getHostnameVerifier() since we do not implement setter methods.

Returns:
HostnameVerifier used by HttxURLConnection.
See Also:
getDefaultHostnameVerifier()., setDefaultHostnameVerifier(HostnameVerifier).

checkClientExpire

public static boolean checkClientExpire()
Static method checking the client certificate, using status flags to determine whether to warn the user the certificate expiry is imminent, is already expired etc.

Returns:
boolean whether we should continue.

setClientExpireDate

public static void setClientExpireDate(Date date)
Method to set the expiry Date of the client side certificate, null for no certificate. This also resets the acknowledgment flags.

Parameters:
date - expiry date of client certificate.
See Also:
getClientExpireDate()

getClientExpireDate

public static Date getClientExpireDate()
Method to get the expiry Date of the client side certificate, null for no certificate.

Returns:
expiry date of client certificate.
See Also:
setClientExpireDate(Date)

setExpire

public static void setExpire(String setString)
Sets whether to check for client certificate expiry and warn about it.

Parameters:
setString - String representation of a boolean, whether to check and warn about expiry of client certificate. If null or invalid, use the default true.
See Also:
getExpire(), EXPIREPROP

getExpire

public static boolean getExpire()
Returns whether to check for client certificate expiry and warn about it.

Returns:
boolean indicating whether to check and warn.
See Also:
setExpire(String), EXPIREPROP

setExpireWarnTime

public static void setExpireWarnTime(String timeString)
Sets the time before expiry of a client certificate to give a warning. When timeString is null or is not a valid number (which includes negative numbers), it will be set to 0, meaning no special 'about-to-expire' warning will be given, only a 'already-expired'.

Parameters:
timeString - String representation of the time in seconds before expiry time when a warning should be given.
See Also:
getExpireWarnTime(), EXPIRETIMEPROP

getExpireWarnTime

public static long getExpireWarnTime()
Returns the number of milliseconds before actual expiry when a warning about imminent expiry of the client certificate is given.

Returns:
number of milliseconds before expiry time.
See Also:
setExpireWarnTime(String), EXPIRETIMEPROP

setCommunicator

public static String setCommunicator(String commInput)
Sets the type of HttxURLConnection.HttxClientCommunicator based on commInput. Valid values are:
  • "stdio" - use stdin/stdout/stderr
  • "popup" - use (swing) popups
  • null - use default "stdio"

Parameters:
commInput - String describing the wished type of communicator to be used.
Returns:
String describing the actual type being used.
See Also:
getCommunicator()

getCommunicator

public static String getCommunicator()
Returns the type of HttxURLConnection.HttxClientCommunicator used for user interaction.

Returns:
String describing the type being used.
See Also:
setCommunicator(String)

setSSLSocketFactory

public void setSSLSocketFactory(SSLSocketFactory arg0)
Overrides:
setSSLSocketFactory in class HttpsURLConnection

getServerCertificates

public Certificate[] getServerCertificates()
                                    throws SSLPeerUnverifiedException
Specified by:
getServerCertificates in class HttpsURLConnection
Throws:
SSLPeerUnverifiedException

getSSLSocketFactory

public SSLSocketFactory getSSLSocketFactory()
Overrides:
getSSLSocketFactory in class HttpsURLConnection

getPeerPrincipal

public Principal getPeerPrincipal()
                           throws SSLPeerUnverifiedException
Overrides:
getPeerPrincipal in class HttpsURLConnection
Throws:
SSLPeerUnverifiedException

getLocalPrincipal

public Principal getLocalPrincipal()
Overrides:
getLocalPrincipal in class HttpsURLConnection

getLocalCertificates

public Certificate[] getLocalCertificates()
Specified by:
getLocalCertificates in class HttpsURLConnection

getCipherSuite

public String getCipherSuite()
Specified by:
getCipherSuite in class HttpsURLConnection

setFileNameMap

public static void setFileNameMap(FileNameMap arg0)
Calls URLConnection.setFileNameMap(FileNameMap).

Parameters:
arg0 - FileNameMap
See Also:
getFileNameMap(), URLConnection.setFileNameMap(FileNameMap)

getFileNameMap

public static FileNameMap getFileNameMap()
Calls URLConnection.getFileNameMap().

Returns:
FileNameMap
See Also:
setFileNameMap(FileNameMap), URLConnection.getFileNameMap()

setDefaultAllowUserInteraction

public static void setDefaultAllowUserInteraction(boolean arg0)
Calls URLConnection.setDefaultAllowUserInteraction(boolean).

Parameters:
arg0 - boolean
See Also:
getDefaultAllowUserInteraction(), URLConnection.setDefaultAllowUserInteraction(boolean)

getDefaultAllowUserInteraction

public static boolean getDefaultAllowUserInteraction()
Calls URLConnection.getDefaultAllowUserInteraction().

Returns:
boolean containing default user interaction.
See Also:
setDefaultAllowUserInteraction(boolean), URLConnection.getDefaultAllowUserInteraction()

setFollowRedirects

public static void setFollowRedirects(boolean arg0)
Calls HttpURLConnection.setFollowRedirects(boolean).

Parameters:
arg0 - boolean
See Also:
getFollowRedirects(), HttpURLConnection.setFollowRedirects(boolean)

getFollowRedirects

public static boolean getFollowRedirects()
Calls HttpURLConnection.getFollowRedirects().

Returns:
boolean with current follow redirects setting.
See Also:
setFollowRedirects(boolean), HttpURLConnection.getFollowRedirects()

setContentHandlerFactory

public static void setContentHandlerFactory(ContentHandlerFactory arg0)
Calls URLConnection.setContentHandlerFactory(ContentHandlerFactory).

Parameters:
arg0 - ContentHandlerFactory
See Also:
URLConnection.setContentHandlerFactory(ContentHandlerFactory)

guessContentTypeFromStream

public static String guessContentTypeFromStream(InputStream arg0)
                                         throws IOException
Calls URLConnection.guessContentTypeFromStream(InputStream).

Parameters:
arg0 - InputStream
Returns:
String containing content-type
Throws:
IOException
See Also:
URLConnection.guessContentTypeFromStream(InputStream)

guessContentTypeFromName

public static String guessContentTypeFromName(String arg0)
Calls URLConnection.guessContentTypeFromName(String).

Parameters:
arg0 - String with name.
Returns:
String containing content-type
See Also:
URLConnection.guessContentTypeFromName(String)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object arg0)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class URLConnection

setUseCaches

public void setUseCaches(boolean arg0)
Overrides:
setUseCaches in class URLConnection

setRequestProperty

public void setRequestProperty(String arg0,
                               String arg1)
Overrides:
setRequestProperty in class URLConnection

setReadTimeout

public void setReadTimeout(int arg0)
Overrides:
setReadTimeout in class URLConnection

setIfModifiedSince

public void setIfModifiedSince(long arg0)
Overrides:
setIfModifiedSince in class URLConnection

setDoOutput

public void setDoOutput(boolean arg0)
Overrides:
setDoOutput in class URLConnection

setDoInput

public void setDoInput(boolean arg0)
Overrides:
setDoInput in class URLConnection

setDefaultUseCaches

public void setDefaultUseCaches(boolean arg0)
Overrides:
setDefaultUseCaches in class URLConnection

setConnectTimeout

public void setConnectTimeout(int arg0)
Overrides:
setConnectTimeout in class URLConnection

setAllowUserInteraction

public void setAllowUserInteraction(boolean arg0)
Overrides:
setAllowUserInteraction in class URLConnection

getUseCaches

public boolean getUseCaches()
Overrides:
getUseCaches in class URLConnection

getURL

public URL getURL()
Overrides:
getURL in class URLConnection

getRequestProperty

public String getRequestProperty(String arg0)
Overrides:
getRequestProperty in class URLConnection

getRequestProperties

public Map<String,List<String>> getRequestProperties()
Overrides:
getRequestProperties in class URLConnection

getReadTimeout

public int getReadTimeout()
Overrides:
getReadTimeout in class URLConnection

getOutputStream

public OutputStream getOutputStream()
                             throws IOException
Overrides:
getOutputStream in class URLConnection
Throws:
IOException

getLastModified

public long getLastModified()
Overrides:
getLastModified in class URLConnection

getInputStream

public InputStream getInputStream()
                           throws IOException
Overrides:
getInputStream in class URLConnection
Throws:
IOException

getIfModifiedSince

public long getIfModifiedSince()
Overrides:
getIfModifiedSince in class URLConnection

getHeaderFields

public Map<String,List<String>> getHeaderFields()
Overrides:
getHeaderFields in class URLConnection

getHeaderFieldInt

public int getHeaderFieldInt(String arg0,
                             int arg1)
Overrides:
getHeaderFieldInt in class URLConnection

getHeaderField

public String getHeaderField(String arg0)
Overrides:
getHeaderField in class URLConnection

getExpiration

public long getExpiration()
Overrides:
getExpiration in class URLConnection

getDoOutput

public boolean getDoOutput()
Overrides:
getDoOutput in class URLConnection

getDoInput

public boolean getDoInput()
Overrides:
getDoInput in class URLConnection

getDefaultUseCaches

public boolean getDefaultUseCaches()
Overrides:
getDefaultUseCaches in class URLConnection

getDate

public long getDate()
Overrides:
getDate in class URLConnection

getContentType

public String getContentType()
Overrides:
getContentType in class URLConnection

getContentLength

public int getContentLength()
Overrides:
getContentLength in class URLConnection

getContentEncoding

public String getContentEncoding()
Overrides:
getContentEncoding in class URLConnection

getContent

public Object getContent(Class[] arg0)
                  throws IOException
Overrides:
getContent in class URLConnection
Throws:
IOException

getContent

public Object getContent()
                  throws IOException
Overrides:
getContent in class URLConnection
Throws:
IOException

getConnectTimeout

public int getConnectTimeout()
Overrides:
getConnectTimeout in class URLConnection

getAllowUserInteraction

public boolean getAllowUserInteraction()
Overrides:
getAllowUserInteraction in class URLConnection

addRequestProperty

public void addRequestProperty(String arg0,
                               String arg1)
Overrides:
addRequestProperty in class URLConnection

usingProxy

public boolean usingProxy()
Specified by:
usingProxy in class HttpURLConnection

setRequestMethod

public void setRequestMethod(String arg0)
                      throws ProtocolException
Overrides:
setRequestMethod in class HttpURLConnection
Throws:
ProtocolException

setInstanceFollowRedirects

public void setInstanceFollowRedirects(boolean arg0)
Overrides:
setInstanceFollowRedirects in class HttpURLConnection

setFixedLengthStreamingMode

public void setFixedLengthStreamingMode(int arg0)
Overrides:
setFixedLengthStreamingMode in class HttpURLConnection

setChunkedStreamingMode

public void setChunkedStreamingMode(int arg0)
Overrides:
setChunkedStreamingMode in class HttpURLConnection

getResponseMessage

public String getResponseMessage()
                          throws IOException
Overrides:
getResponseMessage in class HttpURLConnection
Throws:
IOException

getResponseCode

public int getResponseCode()
                    throws IOException
Overrides:
getResponseCode in class HttpURLConnection
Throws:
IOException

getRequestMethod

public String getRequestMethod()
Overrides:
getRequestMethod in class HttpURLConnection

getPermission

public Permission getPermission()
                         throws IOException
Overrides:
getPermission in class HttpURLConnection
Throws:
IOException

getInstanceFollowRedirects

public boolean getInstanceFollowRedirects()
Overrides:
getInstanceFollowRedirects in class HttpURLConnection

getHeaderFieldKey

public String getHeaderFieldKey(int arg0)
Overrides:
getHeaderFieldKey in class HttpURLConnection

getHeaderFieldDate

public long getHeaderFieldDate(String arg0,
                               long arg1)
Overrides:
getHeaderFieldDate in class HttpURLConnection

getHeaderField

public String getHeaderField(int arg0)
Overrides:
getHeaderField in class HttpURLConnection

getErrorStream

public InputStream getErrorStream()
Overrides:
getErrorStream in class HttpURLConnection


nl.nikhef.slcshttps Mischa Sallé - msalle(AT)nikhef.nl