public class FormatUtil extends Object
Modifier and Type | Field and Description |
---|---|
static String |
MORE_THAN_24HRS |
Constructor and Description |
---|
FormatUtil() |
Modifier and Type | Method and Description |
---|---|
static String |
escapeString(String str)
Replaces newline characters in string with
<br/> to retain
the newlines when the string is displayed in HTML
It also replaces < , > , & and " characters with their corresponding html code
ref : http://www.theukwebdesigncompany.com/articles/entity-escape-characters.php |
static String |
formatLong(long value)
Formats a long value and prepends it with a - or +
This functions is used for showing the diff values for test runs
|
static String |
formatStackTraceForHTML(String stackTrace)
Formats the stack trace for easier readability
|
static String |
formatTime(float duration)
Formats the time into a human readable format
|
public static final String MORE_THAN_24HRS
public static String formatTime(float duration)
duration
- time duration in secondspublic static String formatLong(long value)
value
- long valuepublic static String escapeString(String str)
<br/>
to retain
the newlines when the string is displayed in HTML
It also replaces < , > , & and " characters with their corresponding html code
ref : http://www.theukwebdesigncompany.com/articles/entity-escape-characters.phpstr
- a stringCopyright © 2004-2016. All Rights Reserved.