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 TypeMethodDescriptionint
static TURI
Parses the given argumenturi
and creates an appropriate URI instance.boolean
getHost()
getPath()
int
getPort()
getQuery()
int
hashCode()
boolean
Indicates whether this URI is absolute, which means that a scheme part is defined in this URI.boolean
isOpaque()
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:
compareTo
in interfaceTComparable<TURI>
-
create
Parses the given argumenturi
and 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:
true
if this URI is absolute,false
otherwise.
-
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:
true
if the URI is opaque,false
otherwise.
-
normalize
-
parseServerAuthority
- Throws:
TURISyntaxException
-
relativize
-
resolve
-
resolve
-
toASCIIString
-
toString
-
toURL
- Throws:
TMalformedURLException
-