|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrailo.commons.io.SystemUtil
public final class SystemUtil
Nested Class Summary | |
---|---|
static class |
SystemUtil.TemplateLine
|
Field Summary | |
---|---|
static int |
ARCH_32
|
static int |
ARCH_64
|
static int |
ARCH_UNKNOW
|
static char |
CHAR_DOLLAR
|
static char |
CHAR_EURO
|
static char |
CHAR_POUND
|
static int |
ERR
|
static int |
jreArch
|
static int |
MEMORY_TYPE_ALL
|
static int |
MEMORY_TYPE_HEAP
|
static int |
MEMORY_TYPE_NON_HEAP
|
static int |
osArch
|
static int |
OUT
|
Constructor Summary | |
---|---|
SystemUtil()
|
Method Summary | |
---|---|
static String |
addPlaceHolder(Resource file,
Config config,
String defaultValue)
|
static String |
addPlaceHolder(Resource file,
String defaultValue)
|
static int |
getAddressSize()
|
static long |
getAvailableMemory()
|
static String |
getCharset()
|
static Resource |
getClassLoadeDirectory()
|
static Resource[] |
getClassPathes()
|
static double |
getCpuUsage(long time)
|
static SystemUtil.TemplateLine |
getCurrentContext()
|
static long |
getFreeBytes()
|
static int |
getFreePermGenSpacePromille()
|
static long |
getFreePermGenSpaceSize()
|
static Resource |
getHomeDirectory()
returns the Hoome Directory of the System |
static int |
getJREArch()
return the JRE (Java Runtime Engine) architecture, this can be different from the operating system architecture |
static double |
getLoaderVersion()
|
static Query |
getMemoryUsageAsQuery(int type)
|
static Struct |
getMemoryUsageAsStruct(int type)
|
static Struct |
getMemoryUsageCompact(int type)
|
static int |
getOSArch()
return the operating system architecture |
static String |
getOSSpecificLineSeparator()
|
static MemoryPoolMXBean |
getPermGenSpaceBean()
|
static PrintWriter |
getPrintWriter(int type)
|
static String |
getPropertyEL(String key)
|
static Resource |
getRuningContextRoot()
|
static Resource |
getSystemDirectory()
|
static Resource |
getTempDirectory()
returns the Temp Directory of the System |
static Resource |
getTempFile(String extension,
boolean touch)
returns the a unique temp file (with no auto delete) |
static long |
getTotalBytes()
|
static long |
getUsedMemory()
|
static String |
hash(javax.servlet.ServletContext sc)
|
static boolean |
isCLICall()
|
static boolean |
isFSCaseSensitive()
returns if the file system case sensitive or not |
static boolean |
isUnix()
|
static boolean |
isWindows()
|
static void |
join(Thread t)
|
static long |
microTime()
|
static void |
notify(Object lock)
locks the object (synchronized) before calling notify |
static void |
notifyAll(Object lock)
locks the object (synchronized) before calling notifyAll |
static String |
parsePlaceHolder(String path)
replace path placeholder with the real path, placeholders are [{temp-directory},{system-directory},{home-directory}] |
static String |
parsePlaceHolder(String path,
javax.servlet.ServletContext sc)
|
static String |
parsePlaceHolder(String path,
javax.servlet.ServletContext sc,
Map<String,String> labels)
|
static void |
setCharset(String charset)
|
static void |
setPrintWriter(int type,
PrintWriter pw)
|
static void |
sleep(int time)
|
static void |
sleep(long time)
|
static void |
wait(Object lock)
locks the object (synchronized) before calling wait (no timeout) |
static void |
wait(Object lock,
long timeout)
locks the object (synchronized) before calling wait |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MEMORY_TYPE_ALL
public static final int MEMORY_TYPE_HEAP
public static final int MEMORY_TYPE_NON_HEAP
public static final int ARCH_UNKNOW
public static final int ARCH_32
public static final int ARCH_64
public static final char CHAR_DOLLAR
public static final char CHAR_POUND
public static final char CHAR_EURO
public static final int OUT
public static final int ERR
public static int osArch
public static int jreArch
Constructor Detail |
---|
public SystemUtil()
Method Detail |
---|
public static MemoryPoolMXBean getPermGenSpaceBean()
public static boolean isFSCaseSensitive()
public static boolean isWindows()
public static boolean isUnix()
public static Resource getSystemDirectory()
public static Resource getRuningContextRoot()
public static Resource getTempDirectory()
public static Resource getTempFile(String extension, boolean touch) throws IOException
extension
-
IOException
public static Resource getHomeDirectory()
public static Resource getClassLoadeDirectory()
public static Resource[] getClassPathes()
public static long getUsedMemory()
public static long getAvailableMemory()
public static String parsePlaceHolder(String path)
path
-
public static String addPlaceHolder(Resource file, String defaultValue)
public static String addPlaceHolder(Resource file, Config config, String defaultValue)
public static String parsePlaceHolder(String path, javax.servlet.ServletContext sc, Map<String,String> labels)
public static String parsePlaceHolder(String path, javax.servlet.ServletContext sc)
public static String hash(javax.servlet.ServletContext sc)
public static String getCharset()
public static void setCharset(String charset)
public static String getOSSpecificLineSeparator()
public static void sleep(int time)
public static void sleep(long time)
public static void join(Thread t)
public static void wait(Object lock, long timeout)
lock
- timeout
-
InterruptedException
public static void wait(Object lock)
lock
-
InterruptedException
public static void notify(Object lock)
lock
- timeout
-
InterruptedException
public static void notifyAll(Object lock)
lock
- timeout
-
InterruptedException
public static int getOSArch()
public static int getJREArch()
public static int getAddressSize()
public static long getFreePermGenSpaceSize()
public static int getFreePermGenSpacePromille()
public static Query getMemoryUsageAsQuery(int type) throws DatabaseException
DatabaseException
public static Struct getMemoryUsageAsStruct(int type)
public static Struct getMemoryUsageCompact(int type)
public static String getPropertyEL(String key)
public static long microTime()
public static SystemUtil.TemplateLine getCurrentContext()
public static long getFreeBytes() throws ApplicationException
ApplicationException
public static long getTotalBytes() throws ApplicationException
ApplicationException
public static double getCpuUsage(long time) throws ApplicationException
ApplicationException
public static void setPrintWriter(int type, PrintWriter pw)
public static PrintWriter getPrintWriter(int type)
public static boolean isCLICall()
public static double getLoaderVersion()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |