Index (Frames) | Index (No Frames) | Package | Package Tree | Tree
java.net

Class URI

java.lang.Object
|
+--java.net.URI

All Implemented Interfaces:

Comparable, Serializable


public final class URI

extends Object

implements Comparable, Serializable

Since:Author:

Constructor Summary

URI(java.lang.String str)

Creates an URI from the given string
URI(java.lang.String scheme, java.lang.String userInfo, java.lang.String host, int port, java.lang.String path, java.lang.String query, java.lang.String fragment)

Create an URI from the given components
URI(java.lang.String scheme, java.lang.String authority, java.lang.String path, java.lang.String query, java.lang.String fragment)

Create an URI from the given components
URI(java.lang.String scheme, java.lang.String host, java.lang.String path, java.lang.String fragment)

Create an URI from the given components
URI(java.lang.String scheme, java.lang.String ssp, java.lang.String fragment)

Create an URI from the given components

Method Summary

intcompareTo(java.lang.Object obj)

Compare the URI with another object that must be an URI too
static java.net.URIcreate(java.lang.String str)

Create an URI from the given string
booleanequals(java.lang.Object obj)

Compares the URI with a given object
java.lang.StringgetAuthority()

Returns the decoded authority part of this URI
java.lang.StringgetFragment()

Returns the fragment of the URI
java.lang.StringgetHost()

Returns the hostname of the URI
java.lang.StringgetPath()

Returns the path of the URI
intgetPort()

Returns the port number of the URI
java.lang.StringgetQuery()

Returns the query of the URI
java.lang.StringgetRawAuthority()

Returns the rae authority part of this URI
java.lang.StringgetRawFragment()

Return the raw fragment part of this URI
java.lang.StringgetRawPath()

Returns the raw path part of this URI
java.lang.StringgetRawQuery()

Returns the raw query part of this URI
java.lang.StringgetRawSchemeSpecificPart()

Returns the raw scheme specific part of this URI.
java.lang.StringgetRawUserInfo()

Returns the raw user info part of this URI
java.lang.StringgetScheme()

Returns the scheme of the URI
java.lang.StringgetSchemeSpecificPart()

Returns the decoded scheme specific part of this URI.
java.lang.StringgetUserInfo()

Returns the decoded user info part of this URI
inthashCode()

Computes the hascode of the URI
booleanisAbsolute()

Tells whether this URI is absolute or not
booleanisOpaque()

Tell whether this URI is opaque or not
java.net.URInormalize()

Returns a normalizes versions of the URI
java.net.URIparseServerAuthority()

Attempts to parse this URI's authority component, if defined, into user-information, host, and port components
java.net.URIrelativize(java.net.URI uri)

Relativizes the given URI against this URI
java.net.URIresolve(java.net.URI uri)

Resolves the given URI against this URI
java.net.URIresolve(java.lang.String str)

Resolves the given URI string against this URI
java.lang.StringtoASCIIString()

Returns the URI as US-ASCII string
java.lang.StringtoString()

Returns the URI as string
java.net.URLtoURL()

Creates an URL from an URI

Constructor Details

URI

public URI(java.lang.String str)

Creates an URI from the given string

Parameters:

Throws:


URI

public URI(java.lang.String scheme, java.lang.String ssp, java.lang.String fragment)

Create an URI from the given components

Parameters:

Throws:


URI

public URI(java.lang.String scheme, java.lang.String userInfo, java.lang.String host, int port, java.lang.String path, java.lang.String query, java.lang.String fragment)

Create an URI from the given components

Parameters:

Throws:


URI

public URI(java.lang.String scheme, java.lang.String host, java.lang.String path, java.lang.String fragment)

Create an URI from the given components

Parameters:

Throws:


URI

public URI(java.lang.String scheme, java.lang.String authority, java.lang.String path, java.lang.String query, java.lang.String fragment)

Create an URI from the given components

Parameters:

Throws:


Method Details

compareTo

public int compareTo(java.lang.Object obj)

Compare the URI with another object that must be an URI too

Parameters:

Throws:


create

public static URI create(java.lang.String str)

Create an URI from the given string

Parameters:

Throws:


equals

public boolean equals(java.lang.Object obj)

Compares the URI with a given object

Parameters:


getAuthority

public String getAuthority()

Returns the decoded authority part of this URI


getFragment

public String getFragment()

Returns the fragment of the URI


getHost

public String getHost()

Returns the hostname of the URI


getPath

public String getPath()

Returns the path of the URI


getPort

public int getPort()

Returns the port number of the URI


getQuery

public String getQuery()

Returns the query of the URI


getRawAuthority

public String getRawAuthority()

Returns the rae authority part of this URI


getRawFragment

public String getRawFragment()

Return the raw fragment part of this URI


getRawPath

public String getRawPath()

Returns the raw path part of this URI


getRawQuery

public String getRawQuery()

Returns the raw query part of this URI


getRawSchemeSpecificPart

public String getRawSchemeSpecificPart()

Returns the raw scheme specific part of this URI. The scheme-specific part is never undefined, though it may be empty


getRawUserInfo

public String getRawUserInfo()

Returns the raw user info part of this URI


getScheme

public String getScheme()

Returns the scheme of the URI


getSchemeSpecificPart

public String getSchemeSpecificPart()

Returns the decoded scheme specific part of this URI.


getUserInfo

public String getUserInfo()

Returns the decoded user info part of this URI


hashCode

public int hashCode()

Computes the hascode of the URI


isAbsolute

public boolean isAbsolute()

Tells whether this URI is absolute or not


isOpaque

public boolean isOpaque()

Tell whether this URI is opaque or not


normalize

public URI normalize()

Returns a normalizes versions of the URI


parseServerAuthority

public URI parseServerAuthority()

Attempts to parse this URI's authority component, if defined, into user-information, host, and port components

Throws:


relativize

public URI relativize(java.net.URI uri)

Relativizes the given URI against this URI

Parameters:

Returns:

Throws:


resolve

public URI resolve(java.lang.String str)

Resolves the given URI string against this URI

Parameters:

Returns:

Throws:


resolve

public URI resolve(java.net.URI uri)

Resolves the given URI against this URI

Parameters:

Returns:

Throws:


toASCIIString

public String toASCIIString()

Returns the URI as US-ASCII string


toString

public String toString()

Returns the URI as string


toURL

public URL toURL()

Creates an URL from an URI

Throws: