Java Utililty Methods URI from

List of utility methods to do URI from

Description

The list of methods to do URI from are organized into topic(s).

Method

URI[]toURIs(String[] filePaths)
to UR Is
URI[] result = new URI[filePaths.length];
for (int i = 0; i < filePaths.length; i++) {
    result[i] = toURI(filePaths[i]);
return result;
StringtoURIString(File file)
to URI String
final URI uri = file.toURI();
final boolean isfile = file.isFile();
final String uristr = uri.toString();
if (isfile) {
    return uristr;
} else {
    return uristr.endsWith("/") ? uristr : uristr + '/';
StringtoUriString(File file)
to Uri String
String fileUrl = file.toURI().toURL().toString();
return fileUrl;
StringtoUriString(final Object object)
to Uri String
if (object == null) {
    return "";
String _string = object.toString();
return URLEncoder.encode(_string);