aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp/common/util/IOUtil.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/com/jogamp/common/util/IOUtil.java')
-rw-r--r--src/java/com/jogamp/common/util/IOUtil.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/java/com/jogamp/common/util/IOUtil.java b/src/java/com/jogamp/common/util/IOUtil.java
index d2b97a0..46d6b24 100644
--- a/src/java/com/jogamp/common/util/IOUtil.java
+++ b/src/java/com/jogamp/common/util/IOUtil.java
@@ -592,6 +592,18 @@ public class IOUtil {
}
/**
+ * Wraps {@link #getRelativeOf(URI, String)} for convenience.
+ * @throws IOException
+ */
+ public static URL getRelativeOf(URL baseURL, String relativePath) throws IOException {
+ try {
+ return getRelativeOf(baseURL.toURI(), relativePath).toURL();
+ } catch (URISyntaxException e) {
+ throw new IOException(e);
+ }
+ }
+
+ /**
* Generates a URI for the <i>relativePath</i> relative to the <i>schemeSpecificPart</i>,
* hence the result is a absolute location.
* <p>