Package org.teavm.classlib.java.net
Class TURI
java.lang.Object
org.teavm.classlib.java.net.TURI
- All Implemented Interfaces:
TSerializable,TComparable<TURI>
This class represents an instance of a URI as defined by RFC 2396.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintstatic TURIParses the given argumenturiand creates an appropriate URI instance.booleangetHost()getPath()intgetPort()getQuery()inthashCode()booleanIndicates whether this URI is absolute, which means that a scheme part is defined in this URI.booleanisOpaque()Indicates whether this URI is opaque or not.relativize(TURI relative) toString()toURL()
-
Constructor Details
-
TURI
- Throws:
TURISyntaxException
-
TURI
- Throws:
TURISyntaxException
-
TURI
public TURI(String scheme, String userinfo, String host, int port, String path, String query, String fragment) throws TURISyntaxException - Throws:
TURISyntaxException
-
TURI
- Throws:
TURISyntaxException
-
TURI
public TURI(String scheme, String authority, String path, String query, String fragment) throws TURISyntaxException - Throws:
TURISyntaxException
-
-
Method Details
-
compareTo
- Specified by:
compareToin interfaceTComparable<TURI>
-
create
Parses the given argumenturiand creates an appropriate URI instance.- Parameters:
uri- the string which has to be parsed to create the URI instance.- Returns:
- the created instance representing the given URI.
-
equals
-
getAuthority
-
getFragment
-
getHost
-
getPath
-
getPort
public int getPort() -
getQuery
-
getRawAuthority
-
getRawFragment
-
getRawPath
-
getRawQuery
-
getRawSchemeSpecificPart
-
getRawUserInfo
-
getScheme
-
getSchemeSpecificPart
-
getUserInfo
-
hashCode
public int hashCode() -
isAbsolute
public boolean isAbsolute()Indicates whether this URI is absolute, which means that a scheme part is defined in this URI.- Returns:
trueif this URI is absolute,falseotherwise.
-
isOpaque
public boolean isOpaque()Indicates whether this URI is opaque or not. An opaque URI is absolute and has a scheme-specific part which does not start with a slash character. All parts except scheme, scheme-specific and fragment are undefined.- Returns:
trueif the URI is opaque,falseotherwise.
-
normalize
-
parseServerAuthority
- Throws:
TURISyntaxException
-
relativize
-
resolve
-
resolve
-
toASCIIString
-
toString
-
toURL
- Throws:
TMalformedURLException
-