Advertisement
Guest User

Untitled

a guest
Jul 11th, 2014
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. EmailMessage message = EmailMessage.bind( ewsService,
  2. ExchangeID(), new PropertySet(BasePropertySet.IdOnly, ItemSchema.Attachments, ItemSchema.HasAttachments));
  3.  
  4. for (int i = 0; i < message.getAttachments().getCount(); i++) {
  5. FileAttachment a = (FileAttachment)message.getAttachments().getPropertyAtIndex(i);
  6.  
  7. if (a instanceof FileAttachment) {
  8. if (sWhichAttachments.toLowerCase().contains(a.getName().toLowerCase())) {
  9. String sFN = a.getName().toLowerCase();
  10.  
  11. Attachment name: "
  12. ..
  13. File f = new File(d, sFN);
  14.  
  15. FileOutputStream fos = new FileOutputStream(f);
  16.  
  17. sDoing = ".load(*)";
  18. a.load();
  19. //((FileAttachment) a).load(fos);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement