Java Utililty Methods URI Create

List of utility methods to do URI Create

Description

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

Method

URIcreateUri(final String path, final String query)
Create the URI to use for the test
return new URI(PROTOCOL, AUTHORITY, path, query, null);
URIcreateURI(final String scheme, final String host, final int port)
create URI
return createURIWithFull(scheme, null, host, port, null, null, null);
URIcreateURI(final String scheme, final String host, int port, final String path, final String query, final String fragment)
create URI
StringBuilder buffer = new StringBuilder();
if (host != null) {
    if (scheme != null) {
        buffer.append(scheme);
        buffer.append("://");
    buffer.append(host);
    if (port > 0) {
...
URIcreateURI(final String scheme, final String[] pathAsArray)
create URI
if (pathAsArray == null) {
    throw new NullPointerException("path = null");
StringBuilder path = new StringBuilder("/");
int i = 0;
for (i = 0; i < pathAsArray.length; i++) {
    String pathElement = pathAsArray[i];
    if (0 == i && pathElement.length() == 0) {
...
URIcreateURI(List proxyPorts)
create URI
String uri = proxyPorts.stream().map(port -> "localhost:" + port)
        .collect(Collectors.joining(",", "terracotta://", ""));
return URI.create(uri);
URIcreateUri(String base)
create Uri
try {
    return new URI(base);
} catch (URISyntaxException e) {
    throw new RuntimeException(e);
URIcreateURI(String extension)
Creates a simple URI for the provided extension.
return createURI(extension, null);
StringcreateURI(String filename)
Herstellen einer URI
File file = new File(filename);
String path = file.getAbsolutePath();
String fSep = System.getProperty("file.separator");
if ((fSep != null) && (fSep.length() == 1)) {
    path = path.replace(fSep.charAt(0), '/');
if ((path.length() > 0) && (path.charAt(0) != '/')) {
    path = '/' + path;
...
URIcreateURI(String hostname, int port)
create URI
return URI.create("tcp://" + hostname + ":" + port);
URIcreateUri(String name, Kind kind)
create Uri
try {
    return new URI("mxcache:///" + name.replace('.', '/') + kind.extension);
} catch (URISyntaxException e) {
    throw new IOException(e);