james-mime4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mwiederk...@apache.org
Subject svn commit: r739617 - in /james/mime4j/trunk/src/main/java/org/apache/james/mime4j/message: Header.java Mode.java
Date Sat, 31 Jan 2009 21:11:24 GMT
Author: mwiederkehr
Date: Sat Jan 31 21:11:23 2009
New Revision: 739617

URL: http://svn.apache.org/viewvc?rev=739617&view=rev
Log:
javadoc

Modified:
    james/mime4j/trunk/src/main/java/org/apache/james/mime4j/message/Header.java
    james/mime4j/trunk/src/main/java/org/apache/james/mime4j/message/Mode.java

Modified: james/mime4j/trunk/src/main/java/org/apache/james/mime4j/message/Header.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/src/main/java/org/apache/james/mime4j/message/Header.java?rev=739617&r1=739616&r2=739617&view=diff
==============================================================================
--- james/mime4j/trunk/src/main/java/org/apache/james/mime4j/message/Header.java (original)
+++ james/mime4j/trunk/src/main/java/org/apache/james/mime4j/message/Header.java Sat Jan 31
21:11:23 2009
@@ -237,24 +237,11 @@
     
     
     /**
-     * Write the Header to the given OutputStream. 
-     * <p>
-     * Compatibility mode:
-     * <ul>
-     *  <li>
-     *   {@link Mode#LENIENT}: use charset of the Content-Type header
-     *  </li>
-     *  <li>
-     *   {@link Mode#STRICT_ERROR}: use US-ASCII and throw {@link MimeException} 
-     *    if a non ASCII character is encountered
-     *   </li>
-     *  <li>
-     *   {@link Mode#STRICT_ERROR}: ignore non ASCII characters if encountered
-     *   </li>
-     * </ul>
+     * Write the Header to the given OutputStream using the specified 
+     * compatibility mode. 
+     *
      * @param out the OutputStream to write to
-     * @param mode compatibility mode:
-     *   {@link Mode#LENIENT}, {@link Mode#STRICT_ERROR}, {@link Mode#STRICT_IGNORE}  
+     * @param mode compatibility mode  
      * 
      * @throws IOException if case of an I/O error
      * @throws MimeIOException if case of a MIME protocol violation

Modified: james/mime4j/trunk/src/main/java/org/apache/james/mime4j/message/Mode.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/src/main/java/org/apache/james/mime4j/message/Mode.java?rev=739617&r1=739616&r2=739617&view=diff
==============================================================================
--- james/mime4j/trunk/src/main/java/org/apache/james/mime4j/message/Mode.java (original)
+++ james/mime4j/trunk/src/main/java/org/apache/james/mime4j/message/Mode.java Sat Jan 31
21:11:23 2009
@@ -19,6 +19,22 @@
 
 package org.apache.james.mime4j.message;
 
+import org.apache.james.mime4j.MimeException;
+
+/**
+ * Different compatibility modes for writing a message that determine how to
+ * encode header fields as well as preamble and epilogue of a multipart.
+ */
 public enum Mode {
-    STRICT_IGNORE, STRICT_ERROR, LENIENT;
+    /** Ignore non ASCII characters if encountered. */
+    STRICT_IGNORE,
+
+    /**
+     * Use US-ASCII and throw {@link MimeException} if a non ASCII character is
+     * encountered.
+     */
+    STRICT_ERROR,
+
+    /** Use charset of the Content-Type header. */
+    LENIENT;
 }



Mime
View raw message