commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 30864] - [codec] Document how to print a QPDecoderStream with QCodec?
Date Fri, 27 Aug 2004 05:22:04 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=30864>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=30864

[codec] Document how to print a QPDecoderStream with QCodec?





------- Additional Comments From hauser@acm.org  2004-08-27 05:22 -------
            String inFile = "mimeInput.eml";
            MimeMessage mimeMsg = new MimeMessage(this.session,
                    new FileInputStream(inFile));
           //then I parse the message until I get to the bodypart
           ...
           int count = mp.getCount();
           for (int i = 0; i < count; i++) {
                BodyPart m = mp.getBodyPart(i);
                Object part = m.getContent();
                log.debug("Part " + i + " - " + m.getContentType()
                        + " ---------------------------");           
                Inputstream contentStream = m.getInputStream();           
                //MyVirusScan.ScanAndresetIfPossible(contentStream);
                //I get the described null-pointer here after writing it to 
                //a file for avgscan when trying to reset()
                QCodec apacheQC = new QCodec();
                log.debug(apacheQC.decode(contentStream));
                //now I get 
org.apache.commons.codec.DecoderException: Objects of type
com.sun.mail.util.QPDecoderStream cannot be decoded using Q codec
	at org.apache.commons.codec.net.QCodec.decode(QCodec.java:276)

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message