URI

URI
URI scheme

URI uri = new URI("schemaElement://pathElement@hostName:1234/pathElement?queryElement#fragmentElement");
System.out.println("getAuthority=" + uri.getAuthority());
System.out.println("getFragment=" + uri.getFragment());
System.out.println("getHost=" + uri.getHost());
System.out.println("getPath=" + uri.getPath());
System.out.println("getPort=" + uri.getPort());
System.out.println("getQuery=" + uri.getQuery());
System.out.println("getScheme=" + uri.getScheme());
System.out.println("getSchemeSpecificPart=" + uri.getSchemeSpecificPart());

Console output:
getAuthority=pathElement@hostName:1234
getFragment=fragmentElement
getHost=hostName
getPath=/pathElement
getPort=1234
getQuery=queryElement
getScheme=schemaElement
getSchemeSpecificPart=//pathElement@hostName:1234/pathElement?queryElement

Comments

Popular posts from this blog

Sites, Newsletters, and Blogs

Oracle JDBC ReadTimeout QueryTimeout

Locks held on Oracle for hours after sessions abnormally terminated by node failure