How do you get the file attachment size? I tried using multipart.getBodyPart(i).getSize(), but this returns -1.

Andrea Pompili

In this situation you can do this:

size = multipart.getBodyPart(i).
[Manager Note: This works perfectly for text (7-bit) attachments. In the case of binary attachments, they will be encoded so the stream size will be slightly larger.]
0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



About | Sitemap | Contact