james-mime4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b...@apache.org
Subject svn commit: r937716 - /james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/parser/MimeStreamParser.java
Date Sat, 24 Apr 2010 23:07:55 GMT
Author: bago
Date: Sat Apr 24 23:07:55 2010
New Revision: 937716

URL: http://svn.apache.org/viewvc?rev=937716&view=rev
Log:
Added setFlat(boolean flatMode) method to MimeStreamParser (so to simplify jDKIM usage).

Modified:
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/parser/MimeStreamParser.java

Modified: james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/parser/MimeStreamParser.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/parser/MimeStreamParser.java?rev=937716&r1=937715&r2=937716&view=diff
==============================================================================
--- james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/parser/MimeStreamParser.java
(original)
+++ james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/parser/MimeStreamParser.java
Sat Apr 24 23:07:55 2010
@@ -206,6 +206,18 @@ public class MimeStreamParser {
     }
     
     /**
+     * Enables or disables flat mode. In flat mode rfc822 parts are not
+     * recursively parsed and multipart content is handled as a single
+     * "simple" stream.
+     * 
+     * @param raw <code>true</code> enables raw mode, <code>false</code>
+     *        disables it.
+     */
+    public void setFlat(boolean flat) {
+        mimeTokenStream.setRecursionMode(MimeTokenStream.M_FLAT);
+    }
+    
+    /**
      * Finishes the parsing and stops reading lines.
      * NOTE: No more lines will be parsed but the parser
      * will still call 



Mime
View raw message