public final class UriUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static URI |
createUri(String path)
Creates an
URI for a given path. |
static URI |
createUri(String basePath,
String filePath)
Creates an
URI for a given basePath and a filePath, resolving them in the process. |
static URI |
normalizeUri(URI uri) |
static URI |
trimLastFragment(URI uri)
Creates a new uri by trimming the last path fragment from the given uri.
|
public static URI createUri(String path)
URI for a given path.path - the path to the file or directory.URI representing the path in the following format (using the unix path separator): "/directory/subdirectory"public static URI createUri(String basePath, String filePath)
URI for a given basePath and a filePath, resolving them in the process. This means that if the filePath
is absolute, then a uri representing it is returned. Otherwise, the basePath and filePath are combined together.basePath - the path to the base directory.filePath - the path to the file.URI representing the resolved Path between the two given arguments.public static URI normalizeUri(URI uri)
uri - the uri to normalize.URI.normalize().Copyright © 2003–2019 MuleSoft, Inc.. All rights reserved.