|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.tenduke.io.UriUtils
public final class UriUtils
Utility methods for working with URI objects.
| Method Summary | |
|---|---|
static java.net.URI |
changeFileExtension(java.net.URI uri,
java.lang.String fileExtension)
Changes the "file extension" part of the URI. |
static java.net.URI |
constructFileUri(java.io.File file)
Constructs URI using file scheme and absolute path of the given file. |
static java.net.URI |
constructFileUri(java.lang.String filePath)
Constructs URI using file scheme and the given file path. |
static java.net.URL |
constructFileUrl(java.io.File file)
Constructs URL using file scheme and absolute path of the given file. |
static java.net.URL |
constructFileUrl(java.lang.String filePath)
Constructs URL using file scheme and the given file path. |
static java.lang.String |
getUriPath(java.net.URI uri)
Gets path component of the given uri. |
static java.lang.String |
getUriPath(java.net.URI uri,
java.lang.String characterEncoding)
Gets path component of the given uri. |
static java.lang.String |
getUriPathSafe(java.net.URI uri)
Gets path component of the given uri. |
static java.lang.String |
getUriPathSafe(java.net.URI uri,
java.lang.String characterEncoding)
Gets path component of the given uri. |
static java.lang.String |
getUriQuery(java.net.URI uri)
Gets query component of the given uri. |
static java.lang.String |
getUriQuery(java.net.URI uri,
java.lang.String characterEncoding)
Gets query component of the given uri. |
static java.lang.String |
getUriQuerySafe(java.net.URI uri)
Gets query component of the given uri. |
static java.lang.String |
getUriQuerySafe(java.net.URI uri,
java.lang.String characterEncoding)
Gets query component of the given uri. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static java.net.URI changeFileExtension(java.net.URI uri,
java.lang.String fileExtension)
throws java.net.URISyntaxException
uri - Source URI.fileExtension - The new file extension.
java.net.URISyntaxException - Thrown if the changed URI is not valid URI.
public static java.net.URI constructFileUri(java.io.File file)
throws java.net.URISyntaxException
file - File for which URI is constructed.
java.net.URISyntaxException - Thrown if constructing the URI fails.
public static java.net.URI constructFileUri(java.lang.String filePath)
throws java.net.URISyntaxException
filePath - Path to file for which URI is constructed.
java.net.URISyntaxException - Thrown if constructing the URI fails.
public static java.net.URL constructFileUrl(java.io.File file)
throws java.net.MalformedURLException
file - File for which URL is constructed.
java.net.MalformedURLException - Thrown if constructing the URL fails.
public static java.net.URL constructFileUrl(java.lang.String filePath)
throws java.net.MalformedURLException
filePath - Path to file for which URL is constructed.
java.net.MalformedURLException - Thrown if constructing the URL fails.
public static java.lang.String getUriPath(java.net.URI uri)
throws java.io.UnsupportedEncodingException
uri - The URI object.
java.io.UnsupportedEncodingException - Thrown if given character encoding is not supported.
public static java.lang.String getUriPath(java.net.URI uri,
java.lang.String characterEncoding)
throws java.io.UnsupportedEncodingException
uri - The URI object.characterEncoding - Character encoding to be used by URLDecoder.decode.
java.io.UnsupportedEncodingException - Thrown if given character encoding is not supported.public static java.lang.String getUriPathSafe(java.net.URI uri)
uri - The URI object.
public static java.lang.String getUriPathSafe(java.net.URI uri,
java.lang.String characterEncoding)
uri - The URI object.characterEncoding - Character encoding to be used by URLDecoder.decode.
public static java.lang.String getUriQuery(java.net.URI uri)
throws java.io.UnsupportedEncodingException
uri - The URI object.
java.io.UnsupportedEncodingException - Thrown if given character encoding is not supported.
public static java.lang.String getUriQuery(java.net.URI uri,
java.lang.String characterEncoding)
throws java.io.UnsupportedEncodingException
uri - The URI object.characterEncoding - Character encoding to be used by URLDecoder.decode.
java.io.UnsupportedEncodingException - Thrown if given character encoding is not supported.public static java.lang.String getUriQuerySafe(java.net.URI uri)
uri - The URI object.
public static java.lang.String getUriQuerySafe(java.net.URI uri,
java.lang.String characterEncoding)
uri - The URI object.characterEncoding - Character encoding to be used by URLDecoder.decode.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||