Class URIs
java.lang.Object
org.netpreserve.jwarc.URIs
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanReturns true if the given string begins with a http: or https: URI scheme.static URIparseLeniently(String uri) Like URI.create() but attempts to percent encode when possible instead of throwing.static Stringstatic Stringstatic StringtoNormalizedSurt(String uri)
-
Constructor Details
-
URIs
public URIs()
-
-
Method Details
-
hasHttpOrHttpsScheme
Returns true if the given string begins with a http: or https: URI scheme. Does not enforce the string is a valid URI. -
parseLeniently
Like URI.create() but attempts to percent encode when possible instead of throwing. Note that parseLeniently(s).toString().equals(s) may be false if percent encoding has occurred.- Throws:
IllegalArgumentException- if parsing failed
-
toNormalizedSurt
-
percentEncodeIllegals
-
percentPlusDecode
-