JML

java.net
Class URI

java.lang.Object
  extended byjava.net.URI
All Implemented Interfaces:
Comparable, Serializable

public final class URI
extends Object
implements Comparable, Serializable


Nested Class Summary
private  class URI.Parser
           
 
Field Summary
private  String authority
           
private  String decodedAuthority
           
private  String decodedFragment
           
private  String decodedPath
           
private  String decodedQuery
           
private  String decodedSchemeSpecificPart
           
private  String decodedUserInfo
           
private  String fragment
           
private static long H_ALPHA
           
private static long H_ALPHANUM
           
private static long H_DASH
           
private static long H_DIGIT
           
private static long H_DOT
           
private static long H_ESCAPED
           
private static long H_HEX
           
private static long H_LEFT_BRACKET
           
private static long H_LOWALPHA
           
private static long H_MARK
           
private static long H_PATH
           
private static long H_PCHAR
           
private static long H_REG_NAME
           
private static long H_RESERVED
           
private static long H_SCHEME
           
private static long H_SERVER
           
private static long H_SERVER_PERCENT
           
private static long H_UNRESERVED
           
private static long H_UPALPHA
           
private static long H_URIC
           
private static long H_URIC_NO_SLASH
           
private static long H_USERINFO
           
private  int hash
           
private static char[] hexDigits
           
private  String host
           
private static long L_ALPHA
           
private static long L_ALPHANUM
           
private static long L_DASH
           
private static long L_DIGIT
           
private static long L_DOT
           
private static long L_ESCAPED
           
private static long L_HEX
           
private static long L_LEFT_BRACKET
           
private static long L_LOWALPHA
           
private static long L_MARK
           
private static long L_PATH
           
private static long L_PCHAR
           
private static long L_REG_NAME
           
private static long L_RESERVED
           
private static long L_SCHEME
           
private static long L_SERVER
           
private static long L_SERVER_PERCENT
           
private static long L_UNRESERVED
           
private static long L_UPALPHA
           
private static long L_URIC
           
private static long L_URIC_NO_SLASH
           
private static long L_USERINFO
           
private  String path
           
private  int port
           
private  String query
           
private  String scheme
           
private  String schemeSpecificPart
           
(package private) static long serialVersionUID
           
private  String string
           
private  String userInfo
           
 
Constructor Summary
private URI()
           
  URI(String)
           
  URI(String, String, String)
           
  URI(String, String, String, int, String, String, String)
           
  URI(String, String, String, String)
           
  URI(String, String, String, String, String)
           
 
Method Summary
private  void appendAuthority(StringBuffer, String, String, String, int)
           
private static void appendEncoded(StringBuffer, char)
           
private static void appendEscape(StringBuffer, byte)
           
private  void appendFragment(StringBuffer, String)
           
private  void appendSchemeSpecificPart(StringBuffer, String, String, String, String, int, String, String)
           
private static void checkPath(String, String, String)
           
private static int compare(String, String)
           
private static int compareIgnoringCase(String, String)
           
 int compareTo(Object)
           
 int compareTo(URI)
           
static URI create(String)
           
private static int decode(char)
           
private static byte decode(char, char)
           
private static String decode(String)
           
private  void defineSchemeSpecificPart()
           
private  void defineString()
           
private static String encode(String)
           
private static boolean equal(String, String)
           
private static boolean equalIgnoringCase(String, String)
           
 boolean equals(Object)
           
 String getAuthority()
           
 String getFragment()
           
 String getHost()
           
 String getPath()
           
 int getPort()
           
 String getQuery()
           
 String getRawAuthority()
           
 String getRawFragment()
           
 String getRawPath()
           
 String getRawQuery()
           
 String getRawSchemeSpecificPart()
           
 String getRawUserInfo()
           
 String getScheme()
           
 String getSchemeSpecificPart()
           
 String getUserInfo()
           
private static int hash(int, String)
           
 int hashCode()
           
private static int hashIgnoringCase(int, String)
           
private static long highMask(char, char)
           
private static long highMask(String)
           
 boolean isAbsolute()
           
 boolean isOpaque()
           
private static int join(char[], int[])
           
private static long lowMask(char, char)
           
private static long lowMask(String)
           
private static boolean match(char, long, long)
           
private static void maybeAddLeadingDot(char[], int[])
           
private static int needsNormalization(String)
           
 URI normalize()
           
private static String normalize(String)
           
private static URI normalize(URI)
           
 URI parseServerAuthority()
           
private static String quote(String, long, long)
           
private  void readObject(ObjectInputStream)
           
 URI relativize(URI)
           
private static URI relativize(URI, URI)
           
private static void removeDots(char[], int[])
           
 URI resolve(String)
           
 URI resolve(URI)
           
private static URI resolve(URI, URI)
           
private static String resolvePath(String, String, boolean)
           
private static void split(char[], int[])
           
 String toASCIIString()
           
private static int toLower(char)
           
 String toString()
           
private  String toString(String, String, String, String, String, int, String, String, String)
           
 URL toURL()
           
private  void writeObject(ObjectOutputStream)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

L_RESERVED

private static final long L_RESERVED

L_ALPHANUM

private static final long L_ALPHANUM

H_MARK

private static final long H_MARK

string

private volatile String string

decodedFragment

private transient volatile String decodedFragment

H_URIC_NO_SLASH

private static final long H_URIC_NO_SLASH

L_MARK

private static final long L_MARK

H_PATH

private static final long H_PATH

decodedSchemeSpecificPart

private transient volatile String decodedSchemeSpecificPart

userInfo

private transient String userInfo

scheme

private transient String scheme

L_PATH

private static final long L_PATH

H_RESERVED

private static final long H_RESERVED

H_ALPHANUM

private static final long H_ALPHANUM

L_REG_NAME

private static final long L_REG_NAME

H_UPALPHA

private static final long H_UPALPHA

serialVersionUID

static final long serialVersionUID

L_UPALPHA

private static final long L_UPALPHA

fragment

private transient String fragment

L_HEX

private static final long L_HEX

H_UNRESERVED

private static final long H_UNRESERVED

L_ALPHA

private static final long L_ALPHA

schemeSpecificPart

private transient volatile String schemeSpecificPart

L_PCHAR

private static final long L_PCHAR

H_HEX

private static final long H_HEX

L_UNRESERVED

private static final long L_UNRESERVED

L_SERVER_PERCENT

private static final long L_SERVER_PERCENT

H_REG_NAME

private static final long H_REG_NAME

H_DASH

private static final long H_DASH

H_ESCAPED

private static final long H_ESCAPED

H_URIC

private static final long H_URIC

H_LEFT_BRACKET

private static final long H_LEFT_BRACKET

hexDigits

private static final char[] hexDigits

port

private transient int port

L_LEFT_BRACKET

private static final long L_LEFT_BRACKET

L_ESCAPED

private static final long L_ESCAPED

H_ALPHA

private static final long H_ALPHA

L_DASH

private static final long L_DASH

H_PCHAR

private static final long H_PCHAR

L_URIC

private static final long L_URIC

L_DIGIT

private static final long L_DIGIT

H_SERVER_PERCENT

private static final long H_SERVER_PERCENT

host

private transient String host

L_USERINFO

private static final long L_USERINFO

L_LOWALPHA

private static final long L_LOWALPHA

path

private transient String path

H_SCHEME

private static final long H_SCHEME

H_DIGIT

private static final long H_DIGIT

decodedPath

private transient volatile String decodedPath

H_SERVER

private static final long H_SERVER

L_DOT

private static final long L_DOT

hash

private transient volatile int hash

H_DOT

private static final long H_DOT

decodedUserInfo

private transient volatile String decodedUserInfo

L_SCHEME

private static final long L_SCHEME

L_SERVER

private static final long L_SERVER

decodedAuthority

private transient volatile String decodedAuthority

decodedQuery

private transient volatile String decodedQuery

H_USERINFO

private static final long H_USERINFO

L_URIC_NO_SLASH

private static final long L_URIC_NO_SLASH

query

private transient String query

H_LOWALPHA

private static final long H_LOWALPHA

authority

private transient String authority
Constructor Detail

URI

private URI()

URI

public URI(String)
    throws URISyntaxException
Throws:
URISyntaxException

URI

public URI(String,
           String,
           String,
           int,
           String,
           String,
           String)
    throws URISyntaxException
Throws:
URISyntaxException

URI

public URI(String,
           String,
           String,
           String,
           String)
    throws URISyntaxException
Throws:
URISyntaxException

URI

public URI(String,
           String,
           String,
           String)
    throws URISyntaxException
Throws:
URISyntaxException

URI

public URI(String,
           String,
           String)
    throws URISyntaxException
Throws:
URISyntaxException
Method Detail

create

public static URI create(String)

parseServerAuthority

public URI parseServerAuthority()
                         throws URISyntaxException
Throws:
URISyntaxException

normalize

public URI normalize()

resolve

public URI resolve(URI)

resolve

public URI resolve(String)

relativize

public URI relativize(URI)

toURL

public URL toURL()
          throws MalformedURLException
Throws:
MalformedURLException

getScheme

public String getScheme()

isAbsolute

public boolean isAbsolute()

isOpaque

public boolean isOpaque()

getRawSchemeSpecificPart

public String getRawSchemeSpecificPart()

getSchemeSpecificPart

public String getSchemeSpecificPart()

getRawAuthority

public String getRawAuthority()

getAuthority

public String getAuthority()

getRawUserInfo

public String getRawUserInfo()

getUserInfo

public String getUserInfo()

getHost

public String getHost()

getPort

public int getPort()

getRawPath

public String getRawPath()

getPath

public String getPath()

getRawQuery

public String getRawQuery()

getQuery

public String getQuery()

getRawFragment

public String getRawFragment()

getFragment

public String getFragment()

equals

public boolean equals(Object)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

compareTo

public int compareTo(URI)

toString

public String toString()
Overrides:
toString in class Object

toASCIIString

public String toASCIIString()

writeObject

private void writeObject(ObjectOutputStream)
                  throws IOException
Throws:
IOException

readObject

private void readObject(ObjectInputStream)
                 throws ClassNotFoundException,
                        IOException
Throws:
ClassNotFoundException
IOException

toLower

private static int toLower(char)

equal

private static boolean equal(String,
                             String)

equalIgnoringCase

private static boolean equalIgnoringCase(String,
                                         String)

hash

private static int hash(int,
                        String)

hashIgnoringCase

private static int hashIgnoringCase(int,
                                    String)

compare

private static int compare(String,
                           String)

compareIgnoringCase

private static int compareIgnoringCase(String,
                                       String)

checkPath

private static void checkPath(String,
                              String,
                              String)
                       throws URISyntaxException
Throws:
URISyntaxException

appendAuthority

private void appendAuthority(StringBuffer,
                             String,
                             String,
                             String,
                             int)

appendSchemeSpecificPart

private void appendSchemeSpecificPart(StringBuffer,
                                      String,
                                      String,
                                      String,
                                      String,
                                      int,
                                      String,
                                      String)

appendFragment

private void appendFragment(StringBuffer,
                            String)

toString

private String toString(String,
                        String,
                        String,
                        String,
                        String,
                        int,
                        String,
                        String,
                        String)

defineSchemeSpecificPart

private void defineSchemeSpecificPart()

defineString

private void defineString()

resolvePath

private static String resolvePath(String,
                                  String,
                                  boolean)

resolve

private static URI resolve(URI,
                           URI)

normalize

private static URI normalize(URI)

relativize

private static URI relativize(URI,
                              URI)

needsNormalization

private static int needsNormalization(String)

split

private static void split(char[],
                          int[])

join

private static int join(char[],
                        int[])

removeDots

private static void removeDots(char[],
                               int[])

maybeAddLeadingDot

private static void maybeAddLeadingDot(char[],
                                       int[])

normalize

private static String normalize(String)

lowMask

private static long lowMask(String)

highMask

private static long highMask(String)

lowMask

private static long lowMask(char,
                            char)

highMask

private static long highMask(char,
                             char)

match

private static boolean match(char,
                             long,
                             long)

appendEscape

private static void appendEscape(StringBuffer,
                                 byte)

appendEncoded

private static void appendEncoded(StringBuffer,
                                  char)

quote

private static String quote(String,
                            long,
                            long)

encode

private static String encode(String)

decode

private static int decode(char)

decode

private static byte decode(char,
                           char)

decode

private static String decode(String)

compareTo

public volatile int compareTo(Object)
Specified by:
compareTo in interface Comparable

JML

JML is Copyright (C) 1998-2002 by Iowa State University and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This release depends on code from the MultiJava project and is based in part on the Kopi project Copyright (C) 1990-99 DMS Decision Management Systems Ges.m.b.H.