org.apache.commons.httpclient

Class HttpsURL

public class HttpsURL extends HttpURL

The HTTPS URL.

Author: Sung-Gu Mike Bowler

Field Summary
static intDEFAULT_PORT
Default port for HTTPS URL.
static char[]DEFAULT_SCHEME
Default scheme for HTTPS URL.
static int_default_port
Default port for HTTPS URL.
static char[]_default_scheme
Default scheme for HTTPS URL.
Constructor Summary
protected HttpsURL()
Create an instance as an internal use.
HttpsURL(char[] escaped, String charset)
Construct a HTTPS URL as an escaped form of a character array with the given charset to do escape encoding.
HttpsURL(char[] escaped)
Construct a HTTPS URL as an escaped form of a character array.
HttpsURL(String original, String charset)
Construct a HTTPS URL from a given string with the given charset to do escape encoding.
HttpsURL(String original)
Construct a HTTPS URL from a given string.
HttpsURL(String host, int port, String path)
Construct a HTTPS URL from given components.
HttpsURL(String host, int port, String path, String query)
Construct a HTTPS URL from given components.
HttpsURL(String user, String password, String host)
Construct a HTTPS URL from given components.
HttpsURL(String user, String password, String host, int port)
Construct a HTTPS URL from given components.
HttpsURL(String user, String password, String host, int port, String path)
Construct a HTTPS URL from given components.
HttpsURL(String user, String password, String host, int port, String path, String query)
Construct a HTTPS URL from given components.
HttpsURL(String host, String path, String query, String fragment)
Construct a HTTPS URL from given components.
HttpsURL(String userinfo, String host, String path, String query, String fragment)
Construct a HTTPS URL from given components.
HttpsURL(String userinfo, String host, int port, String path)
Construct a HTTPS URL from given components.
HttpsURL(String userinfo, String host, int port, String path, String query)
Construct a HTTPS URL from given components.
HttpsURL(String userinfo, String host, int port, String path, String query, String fragment)
Construct a HTTPS URL from given components.
HttpsURL(String user, String password, String host, int port, String path, String query, String fragment)
Construct a HTTP URL from given components.
HttpsURL(HttpsURL base, String relative)
Construct a HTTPS URL with a given relative HTTPS URL string.
HttpsURL(HttpsURL base, HttpsURL relative)
Construct a HTTPS URL with a given relative URL.
Method Summary
protected voidcheckValid()
Verify the valid class use for construction.
intgetPort()
Get the port number.
char[]getRawScheme()
Get the scheme.
StringgetScheme()
Get the scheme.

Field Detail

DEFAULT_PORT

public static final int DEFAULT_PORT
Default port for HTTPS URL.

DEFAULT_SCHEME

public static final char[] DEFAULT_SCHEME
Default scheme for HTTPS URL.

_default_port

public static final int _default_port

Deprecated: Use {@link #DEFAULT_PORT} instead. This one doesn't conform to the project naming conventions.

Default port for HTTPS URL.

_default_scheme

public static final char[] _default_scheme

Deprecated: Use {@link #DEFAULT_SCHEME} instead. This one doesn't conform to the project naming conventions.

Default scheme for HTTPS URL.

Constructor Detail

HttpsURL

protected HttpsURL()
Create an instance as an internal use.

HttpsURL

public HttpsURL(char[] escaped, String charset)
Construct a HTTPS URL as an escaped form of a character array with the given charset to do escape encoding.

Parameters: escaped the HTTPS URL character sequence charset the charset to do escape encoding

Throws: URIException If {@link #checkValid()} fails NullPointerException if escaped is null

See Also: HttpsURL

HttpsURL

public HttpsURL(char[] escaped)
Construct a HTTPS URL as an escaped form of a character array.

Parameters: escaped the HTTPS URL character sequence

Throws: URIException If {@link #checkValid()} fails NullPointerException if escaped is null

See Also: HttpsURL

HttpsURL

public HttpsURL(String original, String charset)
Construct a HTTPS URL from a given string with the given charset to do escape encoding.

Parameters: original the HTTPS URL string charset the charset to do escape encoding

Throws: URIException If {@link #checkValid()} fails

See Also: HttpsURL

HttpsURL

public HttpsURL(String original)
Construct a HTTPS URL from a given string.

Parameters: original the HTTPS URL string

Throws: URIException If {@link #checkValid()} fails

See Also: HttpsURL

HttpsURL

public HttpsURL(String host, int port, String path)
Construct a HTTPS URL from given components.

Parameters: host the host string port the port number path the path string

Throws: URIException If {@link #checkValid()} fails

See Also: HttpsURL

HttpsURL

public HttpsURL(String host, int port, String path, String query)
Construct a HTTPS URL from given components.

Parameters: host the host string port the port number path the path string query the query string

Throws: URIException If {@link #checkValid()} fails

See Also: HttpsURL

HttpsURL

public HttpsURL(String user, String password, String host)
Construct a HTTPS URL from given components.

Parameters: user the user name password his or her password host the host string

Throws: URIException If {@link #checkValid()} fails

See Also: HttpsURL

HttpsURL

public HttpsURL(String user, String password, String host, int port)
Construct a HTTPS URL from given components.

Parameters: user the user name password his or her password host the host string port the port number

Throws: URIException If {@link #checkValid()} fails

See Also: HttpsURL

HttpsURL

public HttpsURL(String user, String password, String host, int port, String path)
Construct a HTTPS URL from given components.

Parameters: user the user name password his or her password host the host string port the port number path the path string

Throws: URIException If {@link #checkValid()} fails

See Also: HttpsURL

HttpsURL

public HttpsURL(String user, String password, String host, int port, String path, String query)
Construct a HTTPS URL from given components.

Parameters: user the user name password his or her password host the host string port the port number path the path string query The query string.

Throws: URIException If {@link #checkValid()} fails

See Also: HttpsURL

HttpsURL

public HttpsURL(String host, String path, String query, String fragment)
Construct a HTTPS URL from given components.

Parameters: host the host string path the path string query the query string fragment the fragment string

Throws: URIException If {@link #checkValid()} fails

See Also: HttpsURL

HttpsURL

public HttpsURL(String userinfo, String host, String path, String query, String fragment)
Construct a HTTPS URL from given components. Note: The userinfo format is normally <username>:<password> where username and password must both be URL escaped.

Parameters: userinfo the userinfo string whose parts are URL escaped host the host string path the path string query the query string fragment the fragment string

Throws: URIException If {@link #checkValid()} fails

See Also: HttpsURL

HttpsURL

public HttpsURL(String userinfo, String host, int port, String path)
Construct a HTTPS URL from given components. Note: The userinfo format is normally <username>:<password> where username and password must both be URL escaped.

Parameters: userinfo the userinfo string whose parts are URL escaped host the host string port the port number path the path string

Throws: URIException If {@link #checkValid()} fails

See Also: HttpsURL

HttpsURL

public HttpsURL(String userinfo, String host, int port, String path, String query)
Construct a HTTPS URL from given components. Note: The userinfo format is normally <username>:<password> where username and password must both be URL escaped.

Parameters: userinfo the userinfo string whose parts are URL escaped host the host string port the port number path the path string query the query string

Throws: URIException If {@link #checkValid()} fails

See Also: HttpsURL

HttpsURL

public HttpsURL(String userinfo, String host, int port, String path, String query, String fragment)
Construct a HTTPS URL from given components. Note: The userinfo format is normally <username>:<password> where username and password must both be URL escaped.

Parameters: userinfo the userinfo string whose parts are URL escaped host the host string port the port number path the path string query the query string fragment the fragment string

Throws: URIException If {@link #checkValid()} fails

See Also: HttpsURL

HttpsURL

public HttpsURL(String user, String password, String host, int port, String path, String query, String fragment)
Construct a HTTP URL from given components.

Parameters: user the user name password his or her password host the host string port the port number path the path string query the query string fragment the fragment string

Throws: URIException If {@link #checkValid()} fails

See Also: HttpsURL

HttpsURL

public HttpsURL(HttpsURL base, String relative)
Construct a HTTPS URL with a given relative HTTPS URL string.

Parameters: base the base HttpsURL relative the relative HTTPS URL string

Throws: URIException If {@link #checkValid()} fails

HttpsURL

public HttpsURL(HttpsURL base, HttpsURL relative)
Construct a HTTPS URL with a given relative URL.

Parameters: base the base HttpsURL relative the relative HttpsURL

Throws: URIException If {@link #checkValid()} fails

Method Detail

checkValid

protected void checkValid()
Verify the valid class use for construction.

Throws: URIException the wrong scheme use

getPort

public int getPort()
Get the port number.

Returns: the port number

getRawScheme

public char[] getRawScheme()
Get the scheme. You can get the scheme explicitly.

Returns: the scheme

getScheme

public String getScheme()
Get the scheme. You can get the scheme explicitly.

Returns: the scheme null if empty or undefined

Copyright (c) 1999-2005 - Apache Software Foundation