java.net
public
final
class
java.net.URI
This class represents an instance of a URI as defined by RFC 2396.
Summary
Public Constructors
|
|
|
|
|
|
URI(String uri) |
|
|
|
|
|
|
URI(String scheme, String ssp, String frag) |
|
|
|
|
|
|
URI(String scheme, String userinfo, String host, int port, String path, String query, String fragment) |
|
|
|
|
|
|
URI(String scheme, String host, String path, String fragment) |
|
|
|
|
|
|
URI(String scheme, String authority, String path, String query, String fragment) |
Public Methods
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
Details
Public Constructors
Public Methods
public
int
compareTo(URI uri)
public
boolean
equals(Object o)
Compares the argument to the receiver, and returns true if they represent
the
same object using a class specific comparison. The
implementation in Object returns true only if the argument is the exact
same object as the receiver (==).
Parameters
o
| Object the object to compare with this object. |
Returns
- boolean
true
if the object is the same as this
object false
if it is different from this object.
public
String
getFragment()
Returns the fragment component.
public
String
getHost()
Returns the host component.
public
String
getPath()
Returns the path component.
public
String
getQuery()
Returns the query component.
public
String
getRawAuthority()
Returns the authority component in raw form.
public
String
getRawFragment()
Returns the fragment component in raw form.
public
String
getRawPath()
Returns the path component in raw form.
public
String
getRawQuery()
Returns the query component in raw form.
public
String
getRawSchemeSpecificPart()
Returns the scheme-specific part component in raw form.
public
String
getRawUserInfo()
Returns the user-info component in raw form.
public
String
getSchemeSpecificPart()
Returns the scheme-specific part component.
public
int
hashCode()
Returns an integer hash code for the receiver. Any two objects which
answer
true
when passed to
.equals
must
answer the same value for this method.
public
boolean
isAbsolute()
Indicates whether this URI is absolute
public
boolean
isOpaque()
Indicates whether this URI is opaque
Returns
- true if the URI is opaque, otherwise false
public
URI
parseServerAuthority()
Return this uri instance if it has already been determined as a
ServerAuthority Otherwise try to parse it again as a server authority to
produce a URISyntaxException with the proper diagnostic message.
public
URI
relativize(URI relative)
public
URI
resolve(URI relative)
public
String
toString()
Returns a string containing a concise, human-readable description of the
receiver.
Returns
- String a printable representation for the receiver.