|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsk.baka.tools.UrlUtils
public final class UrlUtils
Contains tools for URLs.
| Field Summary | |
|---|---|
static String |
FILE_URI_HIERARCHICAL_PREFIX
A hierarchical URI file prefix: "file://". |
static String |
FILE_URI_OPAQUE_PREFIX
An opaque URI file prefix: "file:". |
| Method Summary | |
|---|---|
static Map<String,String> |
getQueryMap(String query)
Splits the URL query string into a map of parameter name and value pairs. |
static String |
normalizeSlashes(String fileName)
Normalizes slashes in given string, i.e. |
static String |
toLocalFile(String fileUri)
Converts given file object to a local filesystem file with absolute path. |
static String |
toUri(String fileUri)
Converts given path to an URI if OS-dependent path is given. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String FILE_URI_OPAQUE_PREFIX
public static final String FILE_URI_HIERARCHICAL_PREFIX
| Method Detail |
|---|
public static Map<String,String> getQueryMap(String query)
query - the query string, e.g. foo=bar&q=z, may be null - in this case an empty map is returned.
public static String toLocalFile(String fileUri)
fileUri - the file to convert, in the URI format. WARNING: if given string is a local filesystem-dependent path
then the function may return null.
IllegalArgumentException - if the file is not located on the local filesystem.public static String toUri(String fileUri)
fileUri - the file name to convert, may be in the URI format or it may be a local filesystem reference.
public static String normalizeSlashes(String fileName)
fileName - the file name to normalize
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||