I am using EWS Java API to fetch email message from Exchange Server. I am getting it as EmailMessage class instance. This class is defined in EWS Java API and it extends other EWS API classes as follows:
Now I want to move those mails to ECM Documentum Content server without storing it locally. However the API for this server asks for ByteArrayOutputStream as a param to its import method. Thus I want to convert this EmailMessage object to ByteArrayOutputStream. But it seems that neither EmailObject nor any of its parent classes has implemented Serializable interface. So how can I serialize it to byte[] or to be precise to ByteArrayOutputStream?
Now I want to move those mails to ECM Documentum Content server without storing it locally. However the API for this server asks for ByteArrayOutputStream as a param to its import method. Thus I want to convert this EmailMessage object to ByteArrayOutputStream. But it seems that neither EmailObject nor any of its parent classes has implemented Serializable interface. So how can I serialize it to byte[] or to be precise to ByteArrayOutputStream?