Re: MimeBodyPart.saveFile() troubles
Chris Burdess <[email protected]> Mon, 16 Jul 2007 19:07:04 +0100
| Newsgroups | gmane.comp.java.classpath.extensions.javamail |
|---|---|
| Message-ID | <[email protected]> |
foo wrote: > Hi, I am using the MimeBodyPart.saveFile(File) method. It seems that when I > use this on a Base64-encoded body part, that it would save a file with the > Base64 encoding, instead of decoding it to the original data. > > I also found that if I comment out the following line in the method, that > it would save the file with the correctly decoded data: > //out = MimeUtility.encode(out, getEncoding()); > > And it indeed seems that this line is counterproductive, because (pardon if > I am wrong) this line re-encodes back into Base64 the decoded data that is > sent to "out" by the rest of the method. I agree that it is counterintuitive to save it in the original encoding. I've changed it not to re-encode it for saveFile in HEAD. Thanks for the feedback. -- Chris Burdess