public class CommonUtils extends Object
Modifier and Type | Method and Description |
---|---|
static String |
callStackToString()
Get a string containing the stack of the current location
|
static boolean |
isTextualPart(String contentType)
A "textual part" has one or more of the following criteria
1) a content-type that start with "text"
"application/xml" or "application/soap"
2) has a charset parameter on the content-type.
|
static long |
logDebug(OMElement om,
org.apache.commons.logging.Log log)
Writes the om to a log.debug.
|
static long |
logDebug(OMElement om,
org.apache.commons.logging.Log log,
int limit)
Writes the om to a log.debug.
|
static long |
logDebug(OMElement om,
org.apache.commons.logging.Log log,
int limit,
OMOutputFormat format)
Writes the om to a log.debug.
|
static String |
replace(String name,
String oldT,
String newT)
replace: Like String.replace except that the old and new items are strings.
|
static String |
stackToString(Throwable e)
Get a string containing the stack of the specified exception
|
public static final String replace(String name, String oldT, String newT)
name
- stringoldT
- old text to replacenewT
- new text to usepublic static String callStackToString()
public static String stackToString(Throwable e)
e
- public static long logDebug(OMElement om, org.apache.commons.logging.Log log)
om
- OMElementlog
- Logpublic static long logDebug(OMElement om, org.apache.commons.logging.Log log, int limit)
om
- OMElementlog
- Loglimit
- limit of message to writepublic static long logDebug(OMElement om, org.apache.commons.logging.Log log, int limit, OMOutputFormat format)
om
- OMElementlog
- Loglimit
- limit of message to writeformat
- OMOutputFormatpublic static boolean isTextualPart(String contentType)
contentType
- Copyright © 2004-2013 The Apache Software Foundation. All Rights Reserved.