summaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp/common/net
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-06-09 05:33:16 +0200
committerSven Gothel <[email protected]>2013-06-09 05:33:16 +0200
commitb98825eb7cfb61aead4a7dff57471cd2d2c26823 (patch)
tree8190c7eaac697e4150e47424dc975be512a3979d /src/java/com/jogamp/common/net
parent959d6d83ec26152343d538287c02eeebf0dcf238 (diff)
Fix Bug 683 part1: IOUtil, JarUtil, TempJarCache, .. uses URI instead of URL to remove DNS Lookups etc ..
Diffstat (limited to 'src/java/com/jogamp/common/net')
-rw-r--r--src/java/com/jogamp/common/net/AssetURLContext.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/java/com/jogamp/common/net/AssetURLContext.java b/src/java/com/jogamp/common/net/AssetURLContext.java
index 411d986..470530e 100644
--- a/src/java/com/jogamp/common/net/AssetURLContext.java
+++ b/src/java/com/jogamp/common/net/AssetURLContext.java
@@ -4,6 +4,7 @@ import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.net.MalformedURLException;
+import java.net.URISyntaxException;
import java.net.URL;
import java.net.URLConnection;
import java.net.URLStreamHandler;
@@ -152,7 +153,11 @@ public abstract class AssetURLContext implements PiggybackURLContext {
if(DEBUG) {
System.err.println("AssetURLContext.resolve: <"+path+">");
}
- path = IOUtil.cleanPathString(path);
+ try {
+ path = IOUtil.cleanPathString(path);
+ } catch (URISyntaxException uriEx) {
+ throw new IOException(uriEx);
+ }
try {
// lookup as valid sub-protocol
@@ -180,7 +185,7 @@ public abstract class AssetURLContext implements PiggybackURLContext {
try {
File file = new File(path);
if(file.exists()) {
- url = IOUtil.toURLSimple(file);
+ url = IOUtil.toURISimple(file).toURL();
conn = open(url);
type = null != conn ? 3 : -1;
}