|
www.element4solution.com | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecte4s.util.E4Object
e4s.util.E4Util
public class E4Util
General utility functionality.
| Field Summary |
|---|
| Fields inherited from class e4s.util.E4Object |
|---|
CRLF, E4S_CORE_SYSTEM_LANGUAGE, NBSP, NULLSTR, URL_ENCODING_CHARSET |
| Constructor Summary | |
|---|---|
E4Util()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
_decodeHtml(E4String s)
Decode a string by replacing ä, ö, ü, Ä, Ö, Ü, SS, > ... to ä,ö,ü,Ä,Ö,Ü,ß,.. |
static java.lang.String |
_decodeHtml(java.lang.String s)
Decode a string by replacing ä, ö, ü, Ä, Ö, Ü, SS, > ... to ä,ö,ü,Ä,Ö,Ü,ß,.. |
static java.lang.String |
_encodeHtml(E4String s)
Encode a string by replacing ä,ö,ü,Ä,Ö,Ü,ß,>,< to ä, ö, ü, Ä, Ö, Ü, SS, >, < TODO: Note: this is not a complete implementation! |
static java.lang.String |
_encodeHtml(java.lang.String s)
Encode a string by replacing ä,ö,ü,Ä,Ö,Ü,ß,>,< to ä, ö, ü, Ä, Ö, Ü, SS, >, < TODO: Note: this is not a complete implementation! |
static java.lang.String |
_encodeHtml(java.lang.String s,
boolean escape_tags)
Encode a string by replacing ä,ö,ü,Ä,Ö,Ü,ß,>,< to ä, ö, ü, Ä, Ö, Ü, SS, >, < TODO: Note: this is not a complete implementation! |
static java.lang.String |
_getSVNVersionString()
|
static java.lang.String |
changeFileExtension(java.lang.String filename,
java.lang.String ext)
Change the extension of a filename, e.g. changeFileExtension("c:/myfile.doc","bak") returns "c:/myfile.bak". |
static void |
clearTimeElements(java.util.Date d)
Clear the date fields for hours, minutes, seconds and milliseconds. |
static java.lang.String |
concatenatePath(E4String a,
E4String b)
|
static java.lang.String |
concatenatePath(E4String a,
E4StringImage b)
|
static java.lang.String |
concatenatePath(E4String a,
java.lang.String b)
|
static java.lang.String |
concatenatePath(java.lang.String a,
E4String b)
|
static java.lang.String |
concatenatePath(java.lang.String a,
E4StringImage b)
|
static java.lang.String |
concatenatePath(java.lang.String a,
java.io.File b)
Concatenate a path by using the file name (File.getName()). |
static java.lang.String |
concatenatePath(java.lang.String a,
java.lang.String b)
Concatenate two strings and treat them as OS-path notations. |
static java.lang.String |
concatenatePath(java.lang.String a,
java.lang.String b,
java.lang.String c)
Concatenate three strings and treat them as OS-path notations. |
static boolean |
copyFile(java.io.File sourcefile,
java.io.File destfile)
Copy one single files, do not overwrite existing newer files. |
static boolean |
copyFile(java.io.File sourcefile,
java.io.File destfile,
boolean ignoredate)
Copy one single files |
static boolean |
copyFile(java.lang.String sourcefile,
java.lang.String destfile)
Copy one single files, do not overwrite existing newer files. |
static boolean |
copyFile(java.lang.String sourcefile,
java.lang.String destfile,
boolean ignoredate)
Copy one single files |
static java.lang.String |
Cr2Br(java.lang.String s)
Replace CR by HTML tag <BR>. |
static java.lang.String |
cut(java.lang.String s,
int len)
Deprecated. Use e4string#cut(String,int) instead |
static java.lang.String |
empty2nbsp(java.lang.String s)
Test a String, if it is null or blank (except blanks) then return a value of "&npsp;" or otherwise the String itself. |
static java.lang.String |
escapeTag(java.lang.String s)
Remove any HTML tags from given String, and replace them by < or >. |
static java.lang.String |
fixed(E4String str,
int len)
|
static java.lang.String |
fixed(java.lang.String str,
int len)
Deprecated. Use e4string#fixed(String,int) instead |
static java.lang.String |
format(E4Long n,
int places)
Deprecated. Use E4Long.format(E4Long,int) instead |
static java.lang.String |
format(long n,
int places)
Deprecated. Use E4Long.format(long,int) instead |
static java.lang.String |
getClassBaseName(java.lang.Class clazz)
Gets the base name for a class by removing the package information if available. |
static long |
getFreeMemory()
Get free memory. |
static long |
getMaxMemory()
Get max memory. |
static java.lang.reflect.Field[] |
getNonStaticVisibleFields(java.lang.Class clazz,
boolean include_arrays)
Get all fields of the given Class that are declared public, not final and not static. |
static int |
getRevisionCodeFromSVN(java.lang.Class clazz)
Try to call "public static String _getSVNVersionString()" within the spezified class. |
static int |
getRevisionCodeFromSVN(java.lang.String s)
If String is in the format "$LastChangedRevision: 6155 $" then the revision is returned as a code. |
static long |
getTotalMemory()
Get total memory. |
static boolean |
hasInterface(java.lang.Class clazz,
java.lang.Class testclass)
|
static boolean |
isClass(java.lang.Class clazz,
java.lang.Class compare)
Similar to Object instanceof Object, works with classes |
static java.lang.String |
left(java.lang.String s,
int chars)
Deprecated. |
static java.lang.String[] |
listFilesRecursivley(java.lang.String path)
Get a list of files in a specified path by running recursivley throught all sub directories. |
static java.lang.String[] |
listFilesRecursivley(java.lang.String path,
java.lang.String extension)
Get a list of files in a specified path by running recursivley throught all sub directories. |
static java.lang.String |
makePath(java.lang.String path)
Append a slash if required. |
static org.xml.sax.XMLReader |
makeXMLReader()
Create a XML reader. |
static void |
mkdir(java.io.File fname)
Make a directory for the specified filename (not a path-name !). |
static void |
mkdir(java.lang.String fname)
Make a directory for the specified filename (not a path-name !). |
static void |
removeDirectories(java.io.File path)
Goes recursivley throught each folder and removes all files and folders. |
static void |
removeDirectories(java.lang.String path)
Goes recursivley throught each folder and removes all files and folders. |
static java.lang.String |
toString(org.xml.sax.SAXParseException spe)
|
| Methods inherited from class e4s.util.E4Object |
|---|
Calendar, CName, CName, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelNone, E4LabelNone, E4LabelNone, E4LabelNone, E4LabelSys, E4LabelSys, e4sCopyright, e4sVersion, encode, encode, encode, encodeHtml, encodeHtml, encodeHtml, encodeURL, encodeURL, encodeURL, finalize, getLINE, getTRACE, getTRACE, getTRACE, getTRACE, getTRACE, getTRACE, getTraceMemory, HtmlEncode, HtmlEncode, HtmlEncode, isdecimal, isdigit, isnotok, isnotok, isnumeric, isok, isok, isok, isok, lastCallingFunction, lastCallingFunction, lastCallingFunction, lastCallingFunction, lastCallingStack, mkdirs, null2nbsp, null2nbsp, null2nbsp, ok, ok, ok, ok, outPrintln, setLogFile4Trace, setTraceMemory, STACKTRACE, toDebug, toDouble, toFloat, toFloat, toString, TRACE_CALLS, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, wait |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public E4Util()
| Method Detail |
|---|
public static boolean isClass(java.lang.Class clazz,
java.lang.Class compare)
clazz - Class to compare withcompare - Class to compare to
public static boolean hasInterface(java.lang.Class clazz,
java.lang.Class testclass)
public static final org.xml.sax.XMLReader makeXMLReader()
throws javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXExceptionpublic static java.lang.String Cr2Br(java.lang.String s)
s - the string to replace.
E4Object.CRLFpublic static java.lang.String escapeTag(java.lang.String s)
s - the String where replacements need to be done
public static java.lang.String empty2nbsp(java.lang.String s)
s - value to be tested
public static java.lang.String _encodeHtml(E4String s)
s - the string to be converted
public static java.lang.String _encodeHtml(java.lang.String s)
s - the string to be converted
_encodeHtml(e4s.util.E4String),
_decodeHtml(String)
public static java.lang.String _encodeHtml(java.lang.String s,
boolean escape_tags)
s - the string to be converted
_encodeHtml(e4s.util.E4String),
_decodeHtml(String)public static java.lang.String _decodeHtml(E4String s)
s - the string to be converted
_decodeHtml(String)public static java.lang.String _decodeHtml(java.lang.String s)
s - the string to be converted
_decodeHtml(e4s.util.E4String),
_encodeHtml(String)
public static java.lang.String fixed(java.lang.String str,
int len)
e4string#fixed(String,int) instead
public static java.lang.String format(long n,
int places)
E4Long.format(long,int) instead
public static java.lang.String format(E4Long n,
int places)
E4Long.format(E4Long,int) instead
n - the long to be formattedplaces - number of characters (a value between 1 and 30)
public static java.lang.String fixed(E4String str,
int len)
public static java.lang.reflect.Field[] getNonStaticVisibleFields(java.lang.Class clazz,
boolean include_arrays)
clazz - the Class to be analyzedinclude_arrays - if true, also include array elements
public static java.lang.String concatenatePath(java.lang.String a,
java.lang.String b)
a - the first (left) part of the pathb - the second (right) part of the path or a file name
public static java.lang.String concatenatePath(E4String a,
java.lang.String b)
public static java.lang.String concatenatePath(java.lang.String a,
E4String b)
public static java.lang.String makePath(java.lang.String path)
a - the first (left) part of the path
public static java.lang.String concatenatePath(java.lang.String a,
java.io.File b)
a - the left part of the pathb - the file whose name becomes the right part of the path
concatenatePath(String, String)
public static java.lang.String concatenatePath(java.lang.String a,
E4StringImage b)
public static java.lang.String concatenatePath(E4String a,
E4String b)
public static java.lang.String concatenatePath(E4String a,
E4StringImage b)
public static java.lang.String concatenatePath(java.lang.String a,
java.lang.String b,
java.lang.String c)
a - the first (left) part of the pathb - the middle part of the pathc - the second (right) part of the path or a file name
public static void clearTimeElements(java.util.Date d)
d - the date to be modifiedpublic static java.lang.String toString(org.xml.sax.SAXParseException spe)
public static long getFreeMemory()
getTotalMemory()public static long getTotalMemory()
getFreeMemory()public static long getMaxMemory()
getFreeMemory()
public static boolean copyFile(java.lang.String sourcefile,
java.lang.String destfile)
throws java.lang.Exception
sourcefile - the source file to be copied fromdestfile - the destination file to be copied to
java.lang.Exception
public static boolean copyFile(java.io.File sourcefile,
java.io.File destfile)
throws java.lang.Exception
sourcefile - the source file to be copied fromdestfile - the destination file to be copied to
java.lang.Exception
public static boolean copyFile(java.lang.String sourcefile,
java.lang.String destfile,
boolean ignoredate)
throws java.lang.Exception
sourcefile - the source file to be copied fromdestfile - the destination file to be copied toignoredate - true: copy file also if the source file is older than the new file
java.lang.Exception
public static boolean copyFile(java.io.File sourcefile,
java.io.File destfile,
boolean ignoredate)
throws java.lang.Exception
sourcefile - the source file to be copied fromdestfile - the destination file to be copied toignoredate - true: copy file also if the source file is older than the new file
java.lang.Exceptionpublic static void mkdir(java.io.File fname)
fname - the filename which path shall be createdmkdir(String)public static void mkdir(java.lang.String fname)
fname - the filename which path shall be createdmkdir(String)
public static java.lang.String left(java.lang.String s,
int chars)
E4String.left(String,int)
public static java.lang.String cut(java.lang.String s,
int len)
e4string#cut(String,int) instead
public static void removeDirectories(java.lang.String path)
path - the path to be removed (must be an absolute path)removeDirectories(File)public static void removeDirectories(java.io.File path)
path - the path to be removed (must be an absolute path)removeDirectories(String)
public static java.lang.String changeFileExtension(java.lang.String filename,
java.lang.String ext)
filename - the original filename.ext - if null, the return value will be the filename truncated before the last
point, or extension will be appended to the filename (if ext does not start with
a point it will be appended between the truncated filename and the extension)
public static java.lang.String getClassBaseName(java.lang.Class clazz)
clazz - is typically a built in or user defined class
public static int getRevisionCodeFromSVN(java.lang.String s)
s - the revision code (created by CVS)
getRevisionCodeFromSVN(Class)public static int getRevisionCodeFromSVN(java.lang.Class clazz)
clazz - the class to be analysed
getRevisionCodeFromSVN(String) or the revision code._getSVNVersionString(),
getRevisionCodeFromSVN(String),
E4ServletImplementation_Servlet.sendmail(Throwable,String)public static java.lang.String[] listFilesRecursivley(java.lang.String path)
path - the absolute path to look for files in
listFilesRecursivley(String,String)
public static java.lang.String[] listFilesRecursivley(java.lang.String path,
java.lang.String extension)
path - the absolute path to look for files inextension - if null takes all files, otherwise only matching file extension (not case-sensitive)
listFilesRecursivley(String)public static java.lang.String _getSVNVersionString()
|
www.element4solution.com | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||