Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. public synchronized Report getReport() throws MessagingException {
  2. if (getCount() < 2)
  3. return null;
  4. BodyPart bp = getBodyPart(1);
  5. try {
  6. Object content = bp.getContent();
  7. if (!(content instanceof Report))
  8. return null;
  9. return (Report)content;
  10. } catch (IOException ex) {
  11. throw new MessagingException("IOException getting Report", ex);
  12. }
  13.  
  14. if (content instanceof MultipartReport) {
  15.  
  16. MultipartReport report = (MultipartReport) content;
  17. Object status = report.getReport();
  18.  
  19. ....
  20.  
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement