List of utility methods to do URI to
String | toString(URI pathUri) Create a stripped down string value for error messages. return pathUri != null ? String.format("%s://%s/%s", pathUri.getScheme(), pathUri.getHost(), pathUri.getPath()) : "(null URI)"; |
String | toString(URI uri) Creates a String from a URI, the URI can be relative or absolute, the URI is decoded. StringBuffer buffer = new StringBuffer(); if (uri.getScheme() != null) { buffer.append(uri.getScheme()); buffer.append(":"); buffer.append(uri.getSchemeSpecificPart()); if (uri.getFragment() != null) { buffer.append("#"); ... |
List | toStringList(List Convert a List of URIs to a List of Strings List<String> simpleCollection = new ArrayList<String>(); for (URI uri : list) { simpleCollection.add(uri.toString()); return simpleCollection; |
Set | toStringSet(Collection to String Set Set<String> result = new HashSet<String>(); for (URI uri : uris) { result.add(uri.toASCIIString()); return result; |
String | toUnencodedString(URI uri) Returns a string representation of the given URI that doesn't have illegal characters encoded. StringBuffer result = new StringBuffer(); String scheme = uri.getScheme(); if (scheme != null) { result.append(scheme).append(':'); result.append(uri.getSchemeSpecificPart()); String fragment = uri.getFragment(); if (fragment != null) { ... |
String | URItoString(URI uri) UR Ito String return uri == null ? null : uri.toString();
|
String | uriToString(URI[] uris) uri To String if (uris == null) { return null; StringBuffer ret = new StringBuffer(uris[0].toString()); for (int i = 1; i < uris.length; i++) { ret.append(","); ret.append(uris[i].toString()); return ret.toString(); |
String | uriToString(URI[] uris) uri To String if (uris == null) { return null; StringBuilder ret = new StringBuilder(uris[0].toString()); for (int i = 1; i < uris.length; i++) { ret.append(","); ret.append(uris[i].toString()); return ret.toString(); |