public class URIUtil
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static boolean |
equals(java.net.URI one,
java.net.URI two)
Tests two URIs for equality.
|
static java.lang.String |
toDecodedString(java.net.URI uri)
Returns a string representation of the URI in a form suitable for human consumption.
|
static IPath |
toPath(java.net.URI uri)
Returns an
IPath representing this URI
in the local file system, or null if this URI does
not represent a file in the local file system. |
static java.net.URI |
toURI(IPath path)
Converts an
IPath representing a local file system path to a URI. |
static java.net.URI |
toURI(java.lang.String pathString)
Converts a String representing a local file system path to a
URI. |
static java.net.URI |
toURI(java.lang.String pathString,
boolean forceAbsolute)
Converts a String representing a local file system path to a
URI. |
public static boolean equals(java.net.URI one,
java.net.URI two)
URI.equals(Object)
method is used.one - The first URI to test for equalitytwo - The second URI to test for equalitytrue if the first URI is equal to the second,
as defined by the file systems for those URIs, and false otherwise.public static IPath toPath(java.net.URI uri)
IPath representing this URI
in the local file system, or null if this URI does
not represent a file in the local file system.uri - The URI to convertnullpublic static java.net.URI toURI(IPath path)
IPath representing a local file system path to a URI.path - The path to convertpublic static java.net.URI toURI(java.lang.String pathString)
URI.
For example, this method can be used to create a URI from the output
of File.getAbsolutePath(). The provided path string is always treated
as an absolute path.pathString - The absolute path string to convertpublic static java.net.URI toURI(java.lang.String pathString,
boolean forceAbsolute)
URI.
For example, this method can be used to create a URI from the output
of File.getAbsolutePath().
The forceAbsolute flag controls how this method handles
relative paths. If the value is true, then the input path
is always treated as an absolute path, and the returned URI will be an
absolute URI. If the value is false, then a relative path
provided as input will result in a relative URI being returned.
pathString - The path string to convertforceAbsolute - if true the path is treated as an
absolute pathpublic static java.lang.String toDecodedString(java.net.URI uri)
The string returned by this method is equivalent to that returned by the
URI.toString() method except that all sequences of escaped octets are decoded.
uri - The URI to return in string form
Copyright (c) 2000, 2018 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.