public interface SystemUtil
Modifier and Type | Field | Description |
---|---|---|
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 |
JAVA_VERSION_1_0 |
|
static int |
JAVA_VERSION_1_1 |
|
static int |
JAVA_VERSION_1_2 |
|
static int |
JAVA_VERSION_1_3 |
|
static int |
JAVA_VERSION_1_4 |
|
static int |
JAVA_VERSION_1_5 |
|
static int |
JAVA_VERSION_1_6 |
|
static int |
JAVA_VERSION_1_7 |
|
static int |
JAVA_VERSION_1_8 |
|
static int |
JAVA_VERSION_1_9 |
|
static int |
MEMORY_TYPE_ALL |
|
static int |
MEMORY_TYPE_HEAP |
|
static int |
MEMORY_TYPE_NON_HEAP |
|
static int |
OUT |
Modifier and Type | Method | Description |
---|---|---|
void |
addLibraryPath(Resource res) |
add resource to "java.library.path"
|
int |
getAddressSize() |
|
java.nio.charset.Charset |
getCharset() |
|
double |
getCpuUsage(long time) |
|
long |
getFreeBytes() |
|
int |
getFreePermGenSpacePromille() |
|
long |
getFreePermGenSpaceSize() |
|
Resource |
getHomeDirectory() |
returns the Home Directory of the System
|
int |
getJREArch() |
return the JRE (Java Runtime Engine) architecture, this can be different from the operating
system architecture
|
double |
getLoaderVersion() |
|
java.lang.String |
getMacAddress() |
|
Query |
getMemoryUsageAsQuery(int type) |
|
Struct |
getMemoryUsageAsStruct(int type) |
|
Struct |
getMemoryUsageCompact(int type) |
|
int |
getOSArch() |
return the operating system architecture
|
java.lang.String |
getOSSpecificLineSeparator() |
|
int |
getPermGenFreeSpaceAsAPercentageOfAvailable() |
|
java.io.PrintWriter |
getPrintWriter(int type) |
get the printer writer for System.out or System.err
|
java.net.URL |
getResource(org.osgi.framework.Bundle bundle,
java.lang.String path) |
|
Resource |
getRuningContextRoot() |
|
Resource |
getSystemDirectory() |
|
Resource |
getTempDirectory() |
returns the Temp Directory of the System
|
Resource |
getTempFile(java.lang.String extension,
boolean touch) |
returns a unique temp file (with no auto delete)
|
long |
getTotalBytes() |
|
java.lang.String |
hash(javax.servlet.ServletContext sc) |
|
java.lang.String |
hash64b(java.lang.String str) |
|
java.lang.String |
hashMd5(java.lang.String str) |
|
boolean |
isFSCaseSensitive() |
returns if the file system case sensitive or not
|
boolean |
isLinux() |
|
boolean |
isMacOSX() |
|
boolean |
isSolaris() |
|
boolean |
isUnix() |
|
boolean |
isWindows() |
|
java.lang.String |
parsePlaceHolder(java.lang.String path) |
replace path placeholder with the real path, placeholders are
[{temp-directory},{system-directory},{home-directory}]
|
void |
setCharset(java.nio.charset.Charset charset) |
|
void |
setPrintWriter(int type,
java.io.PrintWriter pw) |
set the printer writer for System.out or System.err
|
void |
stop(java.lang.Thread thread) |
|
void |
stop(PageContext pc,
java.lang.Throwable t,
Log log) |
static final int MEMORY_TYPE_ALL
static final int MEMORY_TYPE_HEAP
static final int MEMORY_TYPE_NON_HEAP
static final int ARCH_UNKNOW
static final int ARCH_32
static final int ARCH_64
static final char CHAR_DOLLAR
static final char CHAR_POUND
static final char CHAR_EURO
static final int JAVA_VERSION_1_0
static final int JAVA_VERSION_1_1
static final int JAVA_VERSION_1_2
static final int JAVA_VERSION_1_3
static final int JAVA_VERSION_1_4
static final int JAVA_VERSION_1_5
static final int JAVA_VERSION_1_6
static final int JAVA_VERSION_1_7
static final int JAVA_VERSION_1_8
static final int JAVA_VERSION_1_9
static final int OUT
static final int ERR
boolean isFSCaseSensitive()
boolean isWindows()
boolean isLinux()
boolean isSolaris()
boolean isMacOSX()
boolean isUnix()
Resource getSystemDirectory()
Resource getRuningContextRoot()
Resource getTempDirectory() throws java.io.IOException
java.io.IOException
Resource getTempFile(java.lang.String extension, boolean touch) throws java.io.IOException
extension
- java.io.IOException
Resource getHomeDirectory()
java.lang.String parsePlaceHolder(java.lang.String path)
path
- java.lang.String hash64b(java.lang.String str)
java.lang.String hashMd5(java.lang.String str) throws java.io.IOException
java.io.IOException
java.lang.String hash(javax.servlet.ServletContext sc)
java.nio.charset.Charset getCharset()
void setCharset(java.nio.charset.Charset charset)
java.lang.String getOSSpecificLineSeparator()
int getOSArch()
int getJREArch()
int getAddressSize()
long getFreePermGenSpaceSize()
int getPermGenFreeSpaceAsAPercentageOfAvailable()
int getFreePermGenSpacePromille()
Query getMemoryUsageAsQuery(int type) throws PageException
PageException
Struct getMemoryUsageAsStruct(int type)
Struct getMemoryUsageCompact(int type)
long getFreeBytes() throws PageException
PageException
long getTotalBytes() throws PageException
PageException
double getCpuUsage(long time) throws PageException
PageException
void setPrintWriter(int type, java.io.PrintWriter pw)
java.io.PrintWriter getPrintWriter(int type)
type
- OUT or ERRdouble getLoaderVersion()
void stop(java.lang.Thread thread)
void stop(PageContext pc, java.lang.Throwable t, Log log)
java.lang.String getMacAddress()
java.net.URL getResource(org.osgi.framework.Bundle bundle, java.lang.String path)
void addLibraryPath(Resource res)
res
- Copyright © 2021. All rights reserved.