| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.httpclient.URI
org.apache.commons.httpclient.HttpURL
public class HttpURL
The HTTP URL.
| Nested Class Summary | 
|---|
| Nested classes/interfaces inherited from class org.apache.commons.httpclient.URI | 
|---|
| URI.DefaultCharsetChanged, URI.LocaleToCharsetMap | 
| Field Summary | |
|---|---|
| static int | _default_portDeprecated. Use DEFAULT_PORTinstead.  This one doesn't conform
 to the project naming conventions. | 
| static char[] | _default_schemeDeprecated. Use DEFAULT_SCHEMEinstead.  This one doesn't
 conform to the project naming conventions. | 
| static int | DEFAULT_PORTDefault port for HTTP URL. | 
| static char[] | DEFAULT_SCHEMEDefault scheme for HTTP URL. | 
| Constructor Summary | |
|---|---|
| protected  | HttpURL()Create an instance as an internal use. | 
|   | HttpURL(char[] escaped)Construct a HTTP URL as an escaped form of a character array. | 
|   | HttpURL(char[] escaped,
        String charset)Construct a HTTP URL as an escaped form of a character array with the given charset to do escape encoding. | 
|   | HttpURL(HttpURL base,
        HttpURL relative)Construct a HTTP URL with a given relative URL. | 
|   | HttpURL(HttpURL base,
        String relative)Construct a HTTP URL with a given relative URL string. | 
|   | HttpURL(String original)Construct a HTTP URL from a given string. | 
|   | HttpURL(String host,
        int port,
        String path)Construct a HTTP URL from given components. | 
|   | HttpURL(String host,
        int port,
        String path,
        String query)Construct a HTTP URL from given components. | 
|   | HttpURL(String original,
        String charset)Construct a HTTP URL from a given string with the given charset to do escape encoding. | 
|   | HttpURL(String userinfo,
        String host,
        int port,
        String path)Construct a HTTP URL from given components. | 
|   | HttpURL(String userinfo,
        String host,
        int port,
        String path,
        String query)Construct a HTTP URL from given components. | 
|   | HttpURL(String userinfo,
        String host,
        int port,
        String path,
        String query,
        String fragment)Construct a HTTP URL from given components. | 
|   | HttpURL(String user,
        String password,
        String host)Construct a HTTP URL from given components. | 
|   | HttpURL(String user,
        String password,
        String host,
        int port)Construct a HTTP URL from given components. | 
|   | HttpURL(String user,
        String password,
        String host,
        int port,
        String path)Construct a HTTP URL from given components. | 
|   | HttpURL(String user,
        String password,
        String host,
        int port,
        String path,
        String query)Construct a HTTP URL from given components. | 
|   | HttpURL(String user,
        String password,
        String host,
        int port,
        String path,
        String query,
        String fragment)Construct a HTTP URL from given components. | 
|   | HttpURL(String host,
        String path,
        String query,
        String fragment)Construct a HTTP URL from given components. | 
|   | HttpURL(String userinfo,
        String host,
        String path,
        String query,
        String fragment)Construct a HTTP URL from given components. | 
| Method Summary | |
|---|---|
| protected  void | checkValid()Verify the valid class use for construction. | 
|  String | getEscapedPassword()Get the escaped password. | 
|  String | getEscapedUser()Get the escaped user | 
|  String | getPassword()Get the password. | 
|  int | getPort()Get the port number. | 
|  char[] | getRawAboveHierPath()Get the level above the this hierarchy level. | 
|  char[] | getRawCurrentHierPath()Get the raw-escaped current hierarchy level. | 
|  char[] | getRawPassword()Get the raw-escaped password. | 
|  char[] | getRawPath()Get the raw escaped path. | 
|  char[] | getRawScheme()Get the scheme. | 
|  char[] | getRawUser()Get the raw-escaped user. | 
|  String | getScheme()Get the scheme. | 
|  String | getUser()Get the user. | 
|  void | setEscapedPassword(String escapedPassword)Set the escaped password string. | 
|  void | setEscapedUser(String escapedUser)Set the escaped user string. | 
|  void | setEscapedUserinfo(String escapedUser,
                   String escapedPassword)Set the raw-escaped user and password. | 
|  void | setPassword(String password)Set the password string. | 
|  void | setQuery(String[] queryName,
         String[] queryValue)Set the query as the name and value pairs. | 
|  void | setQuery(String queryName,
         String queryValue)Set the query as the name and value pair. | 
|  void | setRawPassword(char[] escapedPassword)Set the raw-escaped password. | 
|  void | setRawUser(char[] escapedUser)Set the raw-escaped user. | 
|  void | setRawUserinfo(char[] escapedUser,
               char[] escapedPassword)Set the raw-escaped user and password. | 
| protected  void | setURI()Once it's parsed successfully, set this URI. | 
|  void | setUser(String user)Set the user string. | 
|  void | setUserinfo(String user,
            String password)Set the user and password. | 
| protected static String | toUserinfo(String user,
           String password) | 
| Methods inherited from class java.lang.Object | 
|---|
| finalize, getClass, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
|---|
public static final char[] DEFAULT_SCHEME
public static final char[] _default_scheme
DEFAULT_SCHEME instead.  This one doesn't
 conform to the project naming conventions.
public static final int DEFAULT_PORT
public static final int _default_port
DEFAULT_PORT instead.  This one doesn't conform
 to the project naming conventions.
| Constructor Detail | 
|---|
protected HttpURL()
public HttpURL(char[] escaped,
               String charset)
        throws URIException,
               NullPointerException
escaped - the HTTP URL character sequencecharset - the charset string to do escape encoding
URIException - If checkValid() fails
NullPointerException - if escaped is nullURI.getProtocolCharset()
public HttpURL(char[] escaped)
        throws URIException,
               NullPointerException
escaped - the HTTP URL character sequence
URIException - If checkValid() fails
NullPointerException - if escaped is nullURI.getDefaultProtocolCharset()
public HttpURL(String original,
               String charset)
        throws URIException
original - the HTTP URL stringcharset - the charset string to do escape encoding
URIException - If checkValid() failsURI.getProtocolCharset()
public HttpURL(String original)
        throws URIException
original - the HTTP URL string
URIException - If checkValid() failsURI.getDefaultProtocolCharset()
public HttpURL(String host,
               int port,
               String path)
        throws URIException
host - the host stringport - the port numberpath - the path string
URIException - If checkValid() failsURI.getDefaultProtocolCharset()
public HttpURL(String host,
               int port,
               String path,
               String query)
        throws URIException
host - the host stringport - the port numberpath - the path stringquery - the query string
URIException - If checkValid() failsURI.getDefaultProtocolCharset()
public HttpURL(String user,
               String password,
               String host)
        throws URIException
user - the user namepassword - his or her passwordhost - the host string
URIException - If checkValid() failsURI.getDefaultProtocolCharset()
public HttpURL(String user,
               String password,
               String host,
               int port)
        throws URIException
user - the user namepassword - his or her passwordhost - the host stringport - the port number
URIException - If checkValid() failsURI.getDefaultProtocolCharset()
public HttpURL(String user,
               String password,
               String host,
               int port,
               String path)
        throws URIException
user - the user namepassword - his or her passwordhost - the host stringport - the port numberpath - the path string
URIException - If checkValid() failsURI.getDefaultProtocolCharset()
public HttpURL(String user,
               String password,
               String host,
               int port,
               String path,
               String query)
        throws URIException
user - the user namepassword - his or her passwordhost - the host stringport - the port numberpath - the path stringquery - The query string.
URIException - If checkValid() failsURI.getDefaultProtocolCharset()
public HttpURL(String host,
               String path,
               String query,
               String fragment)
        throws URIException
host - the host stringpath - the path stringquery - the query stringfragment - the fragment string
URIException - If checkValid() failsURI.getDefaultProtocolCharset()
public HttpURL(String userinfo,
               String host,
               String path,
               String query,
               String fragment)
        throws URIException
userinfo format is normally
 <username>:<password> where
 username and password must both be URL escaped.
userinfo - the userinfo string whose parts are URL escapedhost - the host stringpath - the path stringquery - the query stringfragment - the fragment string
URIException - If checkValid() failsURI.getDefaultProtocolCharset()
public HttpURL(String userinfo,
               String host,
               int port,
               String path)
        throws URIException
userinfo format is normally
 <username>:<password> where
 username and password must both be URL escaped.
userinfo - the userinfo string whose parts are URL escapedhost - the host stringport - the port numberpath - the path string
URIException - If checkValid() failsURI.getDefaultProtocolCharset()
public HttpURL(String userinfo,
               String host,
               int port,
               String path,
               String query)
        throws URIException
userinfo format is normally
 <username>:<password> where
 username and password must both be URL escaped.
userinfo - the userinfo string whose parts are URL escapedhost - the host stringport - the port numberpath - the path stringquery - the query string
URIException - If checkValid() failsURI.getDefaultProtocolCharset()
public HttpURL(String userinfo,
               String host,
               int port,
               String path,
               String query,
               String fragment)
        throws URIException
userinfo format is normally
 <username>:<password> where
 username and password must both be URL escaped.
userinfo - the userinfo string whose parts are URL escapedhost - the host stringport - the port numberpath - the path stringquery - the query stringfragment - the fragment string
URIException - If checkValid() failsURI.getDefaultProtocolCharset()
public HttpURL(String user,
               String password,
               String host,
               int port,
               String path,
               String query,
               String fragment)
        throws URIException
user - the user namepassword - his or her passwordhost - the host stringport - the port numberpath - the path stringquery - the query stringfragment - the fragment string
URIException - If checkValid() failsURI.getDefaultProtocolCharset()
public HttpURL(HttpURL base,
               String relative)
        throws URIException
base - the base HttpURLrelative - the relative HTTP URL string
URIException - If checkValid() fails
public HttpURL(HttpURL base,
               HttpURL relative)
        throws URIException
base - the base HttpURLrelative - the relative HttpURL
URIException - If checkValid() fails| Method Detail | 
|---|
protected static String toUserinfo(String user,
                                   String password)
                            throws URIException
URIExceptionpublic char[] getRawScheme()
getRawScheme in class URIpublic String getScheme()
getScheme in class URIpublic int getPort()
getPort in class URI
public void setRawUserinfo(char[] escapedUser,
                           char[] escapedPassword)
                    throws URIException
escapedUser - the raw-escaped userescapedPassword - the raw-escaped password; could be null
URIException - escaped user not valid or user required; escaped
 password not valid or username missed
public void setEscapedUserinfo(String escapedUser,
                               String escapedPassword)
                        throws URIException,
                               NullPointerException
escapedUser - the escaped userescapedPassword - the escaped password; could be null
URIException - escaped user not valid or user required; escaped
 password not valid or username missed
NullPointerException - null user
public void setUserinfo(String user,
                        String password)
                 throws URIException,
                        NullPointerException
user - the userpassword - the password; could be null
URIException - encoding error or username missed
NullPointerException - null user
public void setRawUser(char[] escapedUser)
                throws URIException
escapedUser - the raw-escaped user
URIException - escaped user not valid or user required
public void setEscapedUser(String escapedUser)
                    throws URIException,
                           NullPointerException
escapedUser - the escaped user string
URIException - escaped user not valid
NullPointerException - null user
public void setUser(String user)
             throws URIException,
                    NullPointerException
user - the user string
URIException - user encoding error
NullPointerException - null userpublic char[] getRawUser()
public String getEscapedUser()
public String getUser()
               throws URIException
URIException - If URI.decode(char[], java.lang.String) fails
public void setRawPassword(char[] escapedPassword)
                    throws URIException
escapedPassword - the raw-escaped password; could be null
URIException - escaped password not valid or username missed
public void setEscapedPassword(String escapedPassword)
                        throws URIException
escapedPassword - the escaped password string; could be null
URIException - escaped password not valid or username missed
public void setPassword(String password)
                 throws URIException
password - the password string; could be null
URIException - encoding error or username missedpublic char[] getRawPassword()
public String getEscapedPassword()
public String getPassword()
                   throws URIException
URIException - If URI.decode(char[],String) fails.
public char[] getRawCurrentHierPath()
                             throws URIException
getRawCurrentHierPath in class URIURIException - If URI.getRawCurrentHierPath(char[]) fails.
public char[] getRawAboveHierPath()
                           throws URIException
getRawAboveHierPath in class URIURIException - If URI.getRawCurrentHierPath(char[]) fails.public char[] getRawPath()
getRawPath in class URI
public void setQuery(String queryName,
                     String queryValue)
              throws URIException,
                     NullPointerException
queryName - the query string.queryValue - the query string.
URIException - incomplete trailing escape pattern
 Or unsupported character encoding
NullPointerException - null queryURI.encode(java.lang.String, java.util.BitSet, java.lang.String)
public void setQuery(String[] queryName,
                     String[] queryValue)
              throws URIException,
                     NullPointerException
queryName - the array of the query string.queryValue - the array of the query string.
URIException - incomplete trailing escape pattern,
 unsupported character encoding or wrong array size
NullPointerException - null queryURI.encode(java.lang.String, java.util.BitSet, java.lang.String)
protected void checkValid()
                   throws URIException
URIException - the wrong scheme useprotected void setURI()
setURI in class URIURI.getRawURI()| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||