public class StringUtil
extends java.lang.Object
| Constructor and Description |
|---|
StringUtil() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
exceptionToString(java.lang.Throwable theThrowable)
Returns the stack trace of an exception as String.
|
static java.lang.String |
exceptionToString(java.lang.Throwable theThrowable,
java.lang.String[] theFilterPatterns)
Returns the stack trace of an exception as String, optionally filtering
out line from the stack trac
|
static boolean |
filterLine(java.lang.String theLine,
java.lang.String[] theFilterPatterns) |
static java.lang.String |
replace(java.lang.String theBaseString,
char theChar,
java.lang.String theNewString)
Replaces a character in a string by a substring.
|
public static java.lang.String exceptionToString(java.lang.Throwable theThrowable)
theThrowable - the exception from which to extract the stack trace
as a Stringpublic static java.lang.String exceptionToString(java.lang.Throwable theThrowable,
java.lang.String[] theFilterPatterns)
theThrowable - the exception from which to extract the stack trace
as a StringtheFilterPatterns - Array containing a list of patterns to filter
out from the stack tracepublic static boolean filterLine(java.lang.String theLine,
java.lang.String[] theFilterPatterns)
theLine - The line to checktheFilterPatterns - The patterns to filter outpublic static java.lang.String replace(java.lang.String theBaseString,
char theChar,
java.lang.String theNewString)
theBaseString - the base string in which to perform replacementstheChar - the char to look fortheNewString - the string with which to replace the charCopyright © 2000-2004 Apache Software Foundation. All Rights Reserved.