|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object chrriis.common.Utils
public class Utils
Field Summary | |
---|---|
static boolean |
IS_32_BIT
|
static boolean |
IS_64_BIT
|
static boolean |
IS_JAVA_6_OR_GREATER
|
static boolean |
IS_MAC
|
static boolean |
IS_WINDOWS
|
static boolean |
IS_WINDOWS_7_OR_GREATER
|
static boolean |
IS_WINDOWS_VISTA_OR_GREATER
|
static String |
LINE_SEPARATOR
|
Method Summary | |
---|---|
static String |
arrayDeepToString(Object array)
Produce the deep string value of an array, whatever the actual class type of the array is. |
static String |
decodeURL(String s)
|
static void |
deleteAll(File fileOrDir)
Delete the file, or delete the directtory and all its children recursively. |
static String |
encodeURL(String s)
|
static boolean |
equals(Object o1,
Object o2)
Test the equality of 2 objects, with a check on nullity. |
static String |
escapeXML(String s)
|
static File |
getClassPathFile(Class<?> clazz)
|
static File |
getClassPathFile(String resourcePath)
|
static File |
getDirectory(Class<?> clazz)
|
static File |
getDirectory(String resourcePath)
|
static File |
getJARFile(Class<?> clazz)
|
static File |
getJARFile(String resourcePath)
|
static File |
getLocalFile(String path)
|
static String |
getLocalHostAddress()
Get a local host address on which client and server sockets can connect to communicate. |
static String |
getLocalHostAddress(int port)
Get a local host address on which client and server sockets can connect to communicate. |
static void |
printStackTraces()
|
static void |
printStackTraces(PrintStream printStream)
|
static void |
printStackTraces(PrintWriter printWriter)
|
static String |
simplifyPath(String path)
Simplify a path, where separators are '/', by resolving "." and "..". |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final boolean IS_JAVA_6_OR_GREATER
public static final boolean IS_MAC
public static final boolean IS_WINDOWS
public static final boolean IS_32_BIT
public static final boolean IS_64_BIT
public static final boolean IS_WINDOWS_VISTA_OR_GREATER
public static final boolean IS_WINDOWS_7_OR_GREATER
public static final String LINE_SEPARATOR
Method Detail |
---|
public static String decodeURL(String s)
public static String encodeURL(String s)
public static String escapeXML(String s)
public static File getLocalFile(String path)
public static File getClassPathFile(String resourcePath)
public static File getClassPathFile(Class<?> clazz)
public static File getJARFile(String resourcePath)
public static File getJARFile(Class<?> clazz)
public static File getDirectory(String resourcePath)
public static File getDirectory(Class<?> clazz)
public static void deleteAll(File fileOrDir)
fileOrDir
- a file or a directory to delete.public static boolean equals(Object o1, Object o2)
o1
- the first object.o2
- the second object.
public static String arrayDeepToString(Object array)
array
- the array to get the deep string value of.
public static String simplifyPath(String path)
public static void printStackTraces()
public static void printStackTraces(PrintStream printStream)
public static void printStackTraces(PrintWriter printWriter)
public static String getLocalHostAddress()
public static String getLocalHostAddress(int port)
port
- the port on which to test, or 0 for a random test port.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |