How can I change the content of my message!
I get a message of type "application/x-pkcs7-mime", I use the method object o= msg.getContent() and I get a java object o, o is a instance of InputStream, then I read this InputStream to get the content text encrypted of the message and make some modifications on the content, at last I get a new String which is the content that I want to use to replace the old one! How can I write the new String into my message as the content itself?
I tried to use:
DataHandler dataTransencrypted =new DataHandler(text_clair,msg.getContentType());
msg.setDataHandler(dataTransencrypted);
msg.saveChanges();
But when I do
msg.write to(System.out)
I encounted the exceptions like:
javax.activation.UnsupportedDataTypeException: no object DCH for MIME type application/x-pkcs7-mime;
smime-type=enveloped-data;
name="smime.p7m"
Anyone can help me? Thank you very much!
Message was edited by:
xuetao

