private void downloadPartial(Folder remoteFolder, BackendFolder backendFolder, Message message) throws MessagingException { /* * We have a structure to deal with, from which * we can pull down the parts we want to actually store. * Build a list of parts we are interested in. Text parts will be downloaded * right now, attachments will be left for later. */ Set<Part> viewables = MessageExtractor.collectTextParts(message); /* * Now download the parts we're interested in storing. */ BodyFactory bodyFactory = new DefaultBodyFactory(); for (Part part : viewables) { remoteFolder.fetchPart(message, part, null, bodyFactory); } // Store the updated message locally backendFolder.savePartialMessage(message); }
private void downloadPartial(Folder remoteFolder, BackendFolder backendFolder, Message message) throws MessagingException { /* * We have a structure to deal with, from which * we can pull down the parts we want to actually store. * Build a list of parts we are interested in. Text parts will be downloaded * right now, attachments will be left for later. */ Set<Part> viewables = MessageExtractor.collectTextParts(message); /* * Now download the parts we're interested in storing. */ BodyFactory bodyFactory = new DefaultBodyFactory(); for (Part part : viewables) { remoteFolder.fetchPart(message, part, null, bodyFactory); } // Store the updated message locally backendFolder.savePartialMessage(message); }
private void downloadPartial(Folder remoteFolder, BackendFolder backendFolder, Message message) throws MessagingException { /* * We have a structure to deal with, from which * we can pull down the parts we want to actually store. * Build a list of parts we are interested in. Text parts will be downloaded * right now, attachments will be left for later. */ Set<Part> viewables = MessageExtractor.collectTextParts(message); /* * Now download the parts we're interested in storing. */ BodyFactory bodyFactory = new DefaultBodyFactory(); for (Part part : viewables) { remoteFolder.fetchPart(message, part, null, bodyFactory); } // Store the updated message locally backendFolder.savePartialMessage(message); }