List of utility methods to do URI Create
URI | createURIWithFull(final String scheme, final String userInfo, final String host, final int port, final String path, final String query, final String fragment) create URI With Full try { return new URI(scheme, userInfo, host, port, path, query, fragment); } catch (URISyntaxException e) { throw new IllegalStateException("Unable to create URI", e); |
URI | getUri() get Uri return uri;
|
String | getUri(File file) get Uri URI uri = file.toURI();
return uri.toASCIIString();
|
URI | getURI(File file) Get a URI version of the given file. return file.toURI();
|
URI | getURI(File file) Return URI for file. try { return new URI("file", "", file.toURI().getPath(), null, null); } catch (URISyntaxException e) { return null; |
String | getUri(File file) Returns the URI for the given file. String url = file.toURL().toExternalForm(); StringBuffer strBuf = new StringBuffer(); int urlLength = url.length(); for (int i = 0; i < urlLength; i++) { char ch = url.charAt(i); switch (ch) { case ' ': strBuf.append("%20"); ... |
URI | getURI(final String address) Returns URI for the specified address. final URL url = getURL(address); return url != null ? toURI(url) : null; |
URI | getURI(final String base, final String href) Build URI starting from the given base and href. if (href == null) { throw new IllegalArgumentException("Null link provided"); URI uri = URI.create(href); if (!uri.isAbsolute() && base != null) { uri = URI.create(base + "/" + href); return uri.normalize(); ... |
URI | getURI(final String uri) Since URIs are often hard-coded, needing to catch a syntax exception is mostly unecessary. try { return new URI(uri); } catch (final URISyntaxException e) { throw new IllegalArgumentException("Invalid Syntax: " + uri); |
URI | getURI(List get URI if (col == null) return null; Object o = data.get(col); if (o == null) return null; String s = (String) o; return new URI(s); |