Android
java.net
public final class

java.net.URI

java.lang.Object
java.net.URI Serializable Comparable<T>

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

          int  compareTo(URI uri)
      static    URI  create(String uri)
          boolean  equals(Object o)
Compares the argument to the receiver, and returns true if they represent the same object using a class specific comparison.
          String  getAuthority()
          String  getFragment()
Returns the fragment component.
          String  getHost()
Returns the host component.
          String  getPath()
Returns the path component.
          int  getPort()
Returns the port number.
          String  getQuery()
Returns the query component.
          String  getRawAuthority()
Returns the authority component in raw form.
          String  getRawFragment()
Returns the fragment component in raw form.
          String  getRawPath()
Returns the path component in raw form.
          String  getRawQuery()
Returns the query component in raw form.
          String  getRawSchemeSpecificPart()
Returns the scheme-specific part component in raw form.
          String  getRawUserInfo()
Returns the user-info component in raw form.
          String  getScheme()
Returns the scheme.
          String  getSchemeSpecificPart()
Returns the scheme-specific part component.
          String  getUserInfo()
Returns the userinfo.
          int  hashCode()
Returns an integer hash code for the receiver.
          boolean  isAbsolute()
Indicates whether this URI is absolute
          boolean  isOpaque()
Indicates whether this URI is opaque
          URI  normalize()
          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.
          URI  relativize(URI relative)
          URI  resolve(URI relative)
          URI  resolve(String relative)
          String  toASCIIString()
          String  toString()
Returns a string containing a concise, human-readable description of the receiver.
          URL  toURL()
Methods inherited from class java.lang.Object
Methods inherited from interface java.lang.Comparable

Details

Public Constructors

public URI(String uri)

public URI(String scheme, String ssp, String frag)

public URI(String scheme, String userinfo, String host, int port, String path, String query, String fragment)

public URI(String scheme, String host, String path, String fragment)

public URI(String scheme, String authority, String path, String query, String fragment)

Public Methods

public int compareTo(URI uri)

public static URI create(String 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 getAuthority()

public String getFragment()

Returns the fragment component.

Returns

  • String

public String getHost()

Returns the host component.

Returns

  • String

public String getPath()

Returns the path component.

Returns

  • String

public int getPort()

Returns the port number.

Returns

  • int

public String getQuery()

Returns the query component.

Returns

  • String

public String getRawAuthority()

Returns the authority component in raw form.

Returns

  • String

public String getRawFragment()

Returns the fragment component in raw form.

Returns

  • String

public String getRawPath()

Returns the path component in raw form.

Returns

  • String

public String getRawQuery()

Returns the query component in raw form.

Returns

  • String

public String getRawSchemeSpecificPart()

Returns the scheme-specific part component in raw form.

Returns

  • String

public String getRawUserInfo()

Returns the user-info component in raw form.

Returns

  • String

public String getScheme()

Returns the scheme.

Returns

  • String

public String getSchemeSpecificPart()

Returns the scheme-specific part component.

Returns

  • String

public String getUserInfo()

Returns the userinfo.

Returns

  • String

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.

Returns

  • int the receiver's hash.

public boolean isAbsolute()

Indicates whether this URI is absolute

Returns

  • boolean

public boolean isOpaque()

Indicates whether this URI is opaque

Returns

  • true if the URI is opaque, otherwise false

public URI normalize()

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 URI resolve(String relative)

public String toASCIIString()

public String toString()

Returns a string containing a concise, human-readable description of the receiver.

Returns

  • String a printable representation for the receiver.

public URL toURL()

Copyright 2007 Google Inc. Build 0.9_r1-98467 - 14 Aug 2008 18:48