Package org.apache.axiom.om.util
Class CommonUtils
java.lang.Object
org.apache.axiom.om.util.CommonUtils
Common Utilities
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringGet a string containing the stack of the current locationstatic booleanisTextualPart(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 longWrites the om to a log.debug.static longWrites the om to a log.debug.static longlogDebug(OMElement om, org.apache.commons.logging.Log log, int limit, OMOutputFormat format) Writes the om to a log.debug.static final Stringreplace: Like String.replace except that the old and new items are strings.static StringGet a string containing the stack of the specified exception
-
Method Details
-
replace
replace: Like String.replace except that the old and new items are strings.- Parameters:
name- stringoldT- old text to replacenewT- new text to use- Returns:
- replacement string
-
callStackToString
Get a string containing the stack of the current location- Returns:
- String
-
stackToString
Get a string containing the stack of the specified exception- Parameters:
e-- Returns:
- TODO
-
logDebug
Writes the om to a log.debug. This method assumes optimized mtom attachments Also calculates the length of the message.- Parameters:
om- OMElementlog- Log- Returns:
- length of entire message
-
logDebug
Writes the om to a log.debug. This method assumes optimized mtom attachments Also calculates the length of the message.- Parameters:
om- OMElementlog- Loglimit- limit of message to write- Returns:
- length of entire message
-
logDebug
public static long logDebug(OMElement om, org.apache.commons.logging.Log log, int limit, OMOutputFormat format) Writes the om to a log.debug. Also calculates the length of the message.- Parameters:
om- OMElementlog- Loglimit- limit of message to writeformat- OMOutputFormat- Returns:
- length of entire message
-
isTextualPart
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. Example: An part with a content-type of "image/gif" is a non-textual attachment. An part with a content-type of "application/soap+xml" is an textual attachment- Parameters:
contentType-- Returns:
- true if text, false otherwise
-