On 10/07/12 11:54, lucaro wrote:
In two ways I tried, but Problem still persist.
What problem?
POIFSFileSystem newDoc = new POIFSFileSystem();
EntryUtils.copyNodes(attachment.attachmentDirectory.getDirectory(),
newDoc.getRoot());
File fileToWrite = new File("C:/CR0040POC/detachedMail/" +
attachMsg.getConversationTopic()+".msg");
OutputStream outStream = new FileOutputStream(fileToWrite);
newDoc.writeFilesystem(outStream);
//In this way it is giving me error in opening file.
What sort of error? This looks like it ought to work
POIFSFileSystem newDoc =
attachment.attachmentDirectory.getDirectory().getFileSystem();
File fileToWrite = new File("C:/CR0040POC/detachedMail/" +
attachMsg.getConversationTopic()+".msg");
OutputStream outStream = new FileOutputStream(fileToWrite);
newDoc.writeFilesystem(outStream);
This won't work. You need to do a copy. This just writes the same thing
out again
Nick
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]