|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.activemath.util.Utilities
public final class Utilities
A class to group all utility "functions" useful at several places in the code. No instance can be built, methods are all final static.
| Method Summary | |
|---|---|
static Exception |
deleteRecursively(File file)
Erases the files in the directory, doesn't throw exceptions, just logs the error. |
static String |
join2string(Collection c)
Convenience method for constructing CSV strings |
static String |
join2string(Collection c,
String separator)
Join collection to string by concatenating its elements, separated by some separator. |
static String |
join2string(Object[] arr)
Convenience method for constructing CSV strings |
static String |
join2string(Object[] arr,
String separator)
Join array to string by concatenating its elements, separated by some separator. |
static void |
main(String[] args)
|
static String |
pathDecode(String encodedString)
Performs the inverse of #pathEncode(). |
static String |
pathEncode(String rawString)
Uses an alternate encoder of URLs suitable to be part of another URL. |
static List<String> |
splitCSV(String line)
Split a CSV string into its constituents |
static String |
urlDecode(String encodedString)
|
static String |
urlDecodeFor1_1(String encodedString)
Makes the reverse of URLEncoder.encode(java.lang.String) method. |
static String |
urlEncode(String rawString)
Just calls the URLEncoder.encode(java.lang.String) method. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static final String urlEncode(String rawString)
URLEncoder.encode(java.lang.String) method.
rawString - Missing description of Parameter
public static final String urlDecode(String encodedString)
public static final String join2string(Collection c,
String separator)
c - The collection to be joinedseparator - Will be inserted between two elements
null.public static final String join2string(Collection c)
public static final String join2string(Object[] arr,
String separator)
arr - The array to be joinedseparator - Will be inserted between two elements
public static final String join2string(Object[] arr)
public static final List<String> splitCSV(String line)
line - The string
public static String pathEncode(String rawString)
urlEncode(java.lang.String) otheriwse.
This was needed because URL-encoding is very quickly unreadable
and browsers tend to URL-decode more than once a URL or parts thereof.
rawString - the URL to be encoded, supposed not to contain "__"
(thus avoiding the possibility to apply twice this method)
IllegalArgumentException - if the argument contains "__"pathDecode(java.lang.String)public static String pathDecode(String encodedString)
#pathEncode().
encodedString - the String to be convereted
public static void main(String[] args)
public static final String urlDecodeFor1_1(String encodedString)
URLEncoder.encode(java.lang.String) method. Needed to be implemented as
it was not present in java 1.1 distribution (!).
encodedString - Missing description of Parameter
public static final Exception deleteRecursively(File file)
file - Missing description of Parameter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||