|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface URL
The URL
interface provides methods to access or set
the individual parts of an URL, and to convert strings to URLs and
vice versa.
Field Summary |
---|
Fields inherited from interface org.ogf.saga.SagaObject |
---|
NO_WAIT, WAIT_FOREVER |
Method Summary | |
---|---|
String |
getEscaped()
Returns this URL as a string, with escapes added where needed to parse the result as an URL. |
String |
getFragment()
Returns the fragment part of this URL. |
String |
getHost()
Returns the host part of this URL. |
String |
getPath()
Returns the path part of this URL. |
int |
getPort()
Returns the port number of this URL. |
String |
getQuery()
Returns the query part from this URL. |
String |
getScheme()
Returns the scheme part from this URL. |
String |
getString()
Returns this URL as a string. |
String |
getUserInfo()
Returns the userinfo part from this URL. |
boolean |
isAbsolute()
See URI . |
URL |
normalize()
See URI . |
URL |
resolve(URL url)
See URI . |
void |
setFragment()
Sets the fragment part of this URL to "". |
void |
setFragment(String fragment)
Sets the fragment part of this URL to the specified parameter. |
void |
setHost()
Sets the host part of this URL to "". |
void |
setHost(String host)
Sets the host part of this URL to the specified parameter. |
void |
setPath()
Sets the path part of this URL to "". |
void |
setPath(String path)
Sets the path part of this URL to the specified parameter. |
void |
setPort()
Sets the port number of this URL to -1. |
void |
setPort(int port)
Sets the port number of this URL to the specified parameter. |
void |
setQuery()
Sets the query part of this URL to "". |
void |
setQuery(String query)
Sets the query part of this URL to the specified parameter. |
void |
setScheme()
Sets the scheme part of this URL to the specified parameter. |
void |
setScheme(String scheme)
Sets the scheme part of this URL to the specified parameter. |
void |
setString()
Replaces the current value of the URL with "". |
void |
setString(String url)
Replaces the current value of the URL with the specified value. |
void |
setUserInfo()
Sets the user info part of this URL to "". |
void |
setUserInfo(String userInfo)
Sets the user info part of this URL to the specified parameter. |
URL |
translate(Session session,
String scheme)
Returns a new URL with the scheme part replaced. |
URL |
translate(String scheme)
Returns a new URL with the scheme part replaced. |
Methods inherited from interface org.ogf.saga.SagaObject |
---|
clone, getId, getSession |
Method Detail |
---|
void setString(String url) throws BadParameterException
url
- the string.
BadParameterException
- is thrown when there is a syntax error in the parameter.void setString() throws BadParameterException
BadParameterException
- is thrown by setString(String)
.String getString()
getEscaped()
.
String getEscaped()
String getFragment()
void setFragment(String fragment) throws BadParameterException
fragment
- the fragment.
BadParameterException
- is thrown when there is a syntax error in the parameter.void setFragment() throws BadParameterException
BadParameterException
- is thrown by setFragment(String)
.String getHost()
void setHost(String host) throws BadParameterException
host
- the host.
BadParameterException
- is thrown when there is a syntax error in the parameter.void setHost() throws BadParameterException
BadParameterException
- is thrown by setHost(String)
.String getPath()
void setPath(String path) throws BadParameterException
path
- the path.
BadParameterException
- is thrown when there is a syntax error in the path.void setPath() throws BadParameterException
BadParameterException
- is thrown by setPath(String)
.int getPort()
void setPort(int port) throws BadParameterException
port
- the port number.
BadParameterException
- is thrown when there is an error in the parameter.void setPort() throws BadParameterException
BadParameterException
- is thrown by setPort()
.String getQuery()
void setQuery(String query) throws BadParameterException
query
- the query.
BadParameterException
- is thrown when there is a syntax error in the parameter.void setQuery() throws BadParameterException
BadParameterException
- is thrown by setQuery(String)
.String getScheme()
void setScheme(String scheme) throws BadParameterException
scheme
- the scheme.
BadParameterException
- is thrown when there is a syntax error in the parameter.void setScheme() throws BadParameterException
BadParameterException
- is thrown by setScheme(String)
.String getUserInfo()
void setUserInfo(String userInfo) throws BadParameterException
userInfo
- the userinfo.
BadParameterException
- is thrown when there is a syntax error in the parameter.void setUserInfo() throws BadParameterException
BadParameterException
- is thrown by setUserInfo(String)
.URL translate(String scheme) throws BadParameterException, NoSuccessException
scheme
- the new scheme.
BadParameterException
- is thrown when there is a syntax error in the new URL.
NoSuccessException
- is thrown when the scheme is supported, but the URL
cannot be translated to the scheme.URL translate(Session session, String scheme) throws BadParameterException, NoSuccessException
session
- session to be used for possibly-needed back-end communication.scheme
- the new scheme.
BadParameterException
- is thrown when there is a syntax error in the new URL.
NoSuccessException
- is thrown when the scheme is supported, but the URL
cannot be translated to the scheme.URL resolve(URL url) throws NoSuccessException
URI
.
url
- the url to resolve with respect to this one.
NoSuccessException
- is thrown when resolving fails for some reason.boolean isAbsolute()
URI
.
URL normalize()
URI
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |