Class UriResolver
java.lang.Object
com.itextpdf.styledxmlparser.resolver.resource.UriResolver
Utilities class to resolve URIs.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate URLThe base url.private booleanIndicates if the Uri refers to a local resource. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate URLbaseUriAsUrl(String baseUriString) Resolves a base URI as an URL.private StringGets the base URI.booleanCheck if baseURI is localprivate booleanisPathRooted(Path path, String str) resolveAgainstBaseUri(String uriString) Resolve a given URI against the base URI.private voidresolveBaseUrlOrPath(String base) Resolves the base URI to an URL or path.private URLuriAsFileUrl(String baseUriString) Resolves a base URI as a file URL.
-
Field Details
-
baseUrl
The base url. -
isLocalBaseUri
private boolean isLocalBaseUriIndicates if the Uri refers to a local resource.
-
-
Constructor Details
-
UriResolver
Creates a newUriResolverinstance.- Parameters:
baseUri- the base URI
-
-
Method Details
-
getBaseUri
-
resolveAgainstBaseUri
Resolve a given URI against the base URI.- Parameters:
uriString- the given URI- Returns:
- the resolved URI
- Throws:
MalformedURLException- the malformed URL exception
-
isLocalBaseUri
public boolean isLocalBaseUri()Check if baseURI is local- Returns:
- true if baseURI is local, otherwise false
-
resolveBaseUrlOrPath
Resolves the base URI to an URL or path.- Parameters:
base- the base URI
-
baseUriAsUrl
-
uriAsFileUrl
-
encode
-
isPathRooted
-