@DefaultKey(value="uriTool") public class URITool extends Object
Constructor and Description |
---|
URITool() |
Modifier and Type | Method and Description |
---|---|
static String |
relativizeLink(String baseDirUri,
String link)
Resolves the link as relative to the base dir URI.
|
static URI |
toURI(String uri) |
public static String relativizeLink(String baseDirUri, String link)
Relativizes only absolute links, if the link has the same scheme, host and port as the base, it is made into a relative link as viewed from the base.
This is the same method that's used to relativize project links in Maven site.
baseDirUri
- URI that will serve as the base to calculate the relative onelink
- The link to relativize (make it relative to the base URI if possible)Copyright © 2015–2016 Marek Romanowski. All rights reserved.