MojoCode
MojoCode

Reputation: 11

How to turn off inbuilt decoding in MIME4j?

I am writing a groovy code to get image/attachments from the MIME message and I want to use writeTo and writeBody methods in the MessageWriter class.

How do I turn off or override the decoding in writeTo and writeBody methods outputs in the MessageWriter class?

def instream = new ByteArrayInputStream(imageData.getBytes()) 
Message mimemsg =new Message(instream);         
def ov2=new FileOutputStream(v)
MessageWriter wr=new MessageWriter()
wr2.writeBody(mimemsg.getBody(),ov2)
 ov2.flush()
 ov2.close()

Upvotes: 1

Views: 32

Answers (0)

Related Questions