Return-Path: Delivered-To: apmail-james-mime4j-dev-archive@minotaur.apache.org Received: (qmail 27268 invoked from network); 17 Apr 2011 11:00:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 17 Apr 2011 11:00:48 -0000 Received: (qmail 23620 invoked by uid 500); 17 Apr 2011 11:00:48 -0000 Delivered-To: apmail-james-mime4j-dev-archive@james.apache.org Received: (qmail 23598 invoked by uid 500); 17 Apr 2011 11:00:48 -0000 Mailing-List: contact mime4j-dev-help@james.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: mime4j-dev@james.apache.org Delivered-To: mailing list mime4j-dev@james.apache.org Received: (qmail 23590 invoked by uid 99); 17 Apr 2011 11:00:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 17 Apr 2011 11:00:48 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 17 Apr 2011 11:00:43 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id E718AA54A9 for ; Sun, 17 Apr 2011 11:00:05 +0000 (UTC) Date: Sun, 17 Apr 2011 11:00:05 +0000 (UTC) From: "Stefano Bagnara (JIRA)" To: mime4j-dev@james.apache.org Message-ID: <379660403.63099.1303038005943.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <880887264.63080.1303036445850.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (MIME4J-192) setFlatMode and setContentDecoding are not exposed by the MessageBuilder interface MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/MIME4J-192?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13020769#comment-13020769 ] Stefano Bagnara commented on MIME4J-192: ---------------------------------------- Hi Oleg, I can't understand your solution. newMessageBuilder is a jdkim method and doesn't expose the 2 booleans: --- private MessageBuilder newMessageBuilder() throws MimeException { MimeEntityConfig mec = new MimeEntityConfig(); mec.setMaxLineLen(10000); mec.setMaxHeaderLen(30000); MessageServiceFactory mbf = MessageServiceFactory.newInstance(); mbf.setAttribute("MimeEntityConfig", mec); // mbf.setProperty("MaxLineLength", 10000); MessageBuilder mb = mbf.newMessageBuilder(); return mb; } --- I've checked the MessageServiceFactory and its newMessageBuilder method but it doesn't expose that parameters, too. Can you give me an hint? > setFlatMode and setContentDecoding are not exposed by the MessageBuilder interface > ---------------------------------------------------------------------------------- > > Key: MIME4J-192 > URL: https://issues.apache.org/jira/browse/MIME4J-192 > Project: JAMES Mime4j > Issue Type: Improvement > Components: dom > Affects Versions: 0.7 > Reporter: Stefano Bagnara > Fix For: 0.7 > > > Here is jDKIM use case: > ---- > public Message(InputStream is) throws IOException, MimeException { > MessageBuilder mb = newMessageBuilder(); > > if (mb instanceof MessageBuilderImpl) { > ((MessageBuilderImpl) mb).setFlatMode(true); > ((MessageBuilderImpl) mb).setContentDecoding(false); > } > org.apache.james.mime4j.dom.Message mImpl = mb.parse(new EOLConvertingInputStream(is)); > > this.message = mImpl; > } > ---- > Is this the expected client pattern? Or should we expose setFlatMode and setContentDecoding in the MessageBuilder interface so to remove the class casting requirement? -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira