이 콘텐츠는 선택한 언어로 제공되지 않습니다.
11.6. Using Mime Decoders in Gateway Implementations
The easiest way to make a MessageComposer use the installed mime decoders is via the ConfigTree and the
MimeDecoder.Factory
class factory method:
this.mimeDecoder = MimeDecoder.Factory.getInstanceByConfigTree(config);
this.mimeDecoder = MimeDecoder.Factory.getInstanceByConfigTree(config);
This relies on the listener configuration specifying either the “mimeType” or “mimeDecoder” configuration properties (as supported by the File and FTP listeners):
To perform the actual decoding of the transport payload, the MessageComposer instance utilizes the decode method on its mimeDecoder instance:
Object decodedPayload = mimeDecoder.decode(payloadBytes);
Object decodedPayload = mimeDecoder.decode(payloadBytes);
It then sets the “decodedPayload” Object instance on the message instance being composed.