summaryrefslogtreecommitdiffstats
path: root/src/junit/com/jogamp/common/net/URIDumpUtil.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/junit/com/jogamp/common/net/URIDumpUtil.java')
-rw-r--r--src/junit/com/jogamp/common/net/URIDumpUtil.java42
1 files changed, 19 insertions, 23 deletions
diff --git a/src/junit/com/jogamp/common/net/URIDumpUtil.java b/src/junit/com/jogamp/common/net/URIDumpUtil.java
index 8d94b6d..1a74742 100644
--- a/src/junit/com/jogamp/common/net/URIDumpUtil.java
+++ b/src/junit/com/jogamp/common/net/URIDumpUtil.java
@@ -7,14 +7,14 @@ import java.net.URL;
public class URIDumpUtil {
public static void showURX(final String urx) throws MalformedURLException, URISyntaxException {
- System.err.println("XXXXXX "+urx);
+ System.err.println("WWWWWW "+urx);
showURL(new URL(urx));
showURI(new URI(urx));
- System.err.println("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
+ System.err.println("WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW");
}
public static void showURL(final URL url) {
- System.err.println("YYYYYY URL "+url);
+ System.err.println("XXXXXX URL "+url.toString());
System.err.println("protocol: "+url.getProtocol());
System.err.println("auth: "+url.getAuthority());
System.err.println("host: "+url.getHost());
@@ -22,28 +22,24 @@ public class URIDumpUtil {
System.err.println("file: "+url.getFile() + " ( path " + url.getPath() + ", query " + url.getQuery() + " ) " );
System.err.println("ref: "+url.getRef());
}
+
public static void showURI(final URI uri) {
- System.err.println("ZZZZZZ URI "+uri);
- // 1 [scheme:]scheme-specific-part[#fragment]
- System.err.println("1 scheme: "+uri.getScheme());
- System.err.println("1 scheme-part: "+uri.getRawSchemeSpecificPart());
- System.err.println("1 fragment: "+uri.getRawFragment());
+ showURI("YYYYYY URI "+uri+", isOpaque "+uri.isOpaque()+", isAbs "+uri.isAbsolute(), uri);
+ }
+ public static void showURI(final String message, final URI uri) {
+ System.err.println(message);
- // 2 [scheme:][//authority][path][?query][#fragment]
- System.err.println("2 scheme: "+uri.getScheme());
- System.err.println("2 auth: "+uri.getRawAuthority());
- System.err.println("2 path: "+uri.getRawPath());
- System.err.println("2 query: "+uri.getRawQuery());
- System.err.println("2 fragment: "+uri.getRawFragment());
+ System.err.println("0.0.0 string: "+uri.toString());
+ System.err.println("0.0.0 ascii : "+uri.toASCIIString());
- // 3 [scheme:][//authority][path][?query][#fragment]
- // authority: [user-info@]host[:port]
- System.err.println("3 scheme: "+uri.getScheme());
- System.err.println("3 user-info: "+uri.getRawUserInfo());
- System.err.println("3 host: "+uri.getHost());
- System.err.println("3 port: "+uri.getPort());
- System.err.println("3 path: "+uri.getRawPath());
- System.err.println("3 query: "+uri.getRawQuery());
- System.err.println("3 fragment: "+uri.getRawFragment());
+ System.err.println("1.0.0 scheme: "+uri.getScheme());
+ System.err.println("2.0.0 scheme-part: "+uri.getRawSchemeSpecificPart()+" (raw), "+uri.getSchemeSpecificPart()+" (dec)");
+ System.err.println("2.1.0 auth: "+uri.getRawAuthority()+" (raw), "+uri.getAuthority()+" (dec)");
+ System.err.println("2.1.1 user-info: "+uri.getRawUserInfo()+" (raw), "+uri.getUserInfo()+" (dec)");
+ System.err.println("2.1.1 host: "+uri.getHost());
+ System.err.println("2.1.1 port: "+uri.getPort());
+ System.err.println("2.2.0 path: "+uri.getRawPath()+" (raw), "+uri.getPath()+" (dec)");
+ System.err.println("2.3.0 query: "+uri.getRawQuery()+" (raw), "+uri.getQuery()+" (dec)");
+ System.err.println("3.0.0 fragment: "+uri.getRawFragment()+" (raw), "+uri.getFragment()+" (dec)");
}
}