public class MessageHelper
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static AdaptrisMessage |
checkCharsetAndApply(AdaptrisMessage msg,
java.lang.String charEnc,
boolean passthru)
Check the character set and apply it as the ContentEncoding on the message.
|
static void |
copyPayload(AdaptrisMessage src,
AdaptrisMessage dest)
Copy the payload from the src to the destination message.
|
static void |
copyPayloadStream(AdaptrisMessage src,
AdaptrisMessage dest)
Copy the payload from the src to the destination message.
|
public static void copyPayload(AdaptrisMessage src, AdaptrisMessage dest) throws java.io.IOException
Has the specific behaviour where if both message implementations are a
FileBackedMessage
then the src message is added as object metadata to the destination
message to avoid garbage collection scoping issues (since temporary files will be removed on
gc).
java.io.IOException
public static void copyPayloadStream(AdaptrisMessage src, AdaptrisMessage dest) throws java.io.IOException
java.io.IOException
public static AdaptrisMessage checkCharsetAndApply(AdaptrisMessage msg, java.lang.String charEnc, boolean passthru)
msg
- the messagecharEnc
- the characterEncodingpassthru
- if true then just call InterlokMessage.setContentEncoding(String)
.