Author: bago
Date: Fri Jun 17 08:31:32 2011
New Revision: 1136805
URL: http://svn.apache.org/viewvc?rev=1136805&view=rev
Log:
Expose writing methods for other dom objects via MessageFormatter (MIME4J-193)
Modified:
james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/dom/MessageFormatter.java
Modified:
james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/dom/MessageFormatter.java
URL:
http://svn.apache.org/viewvc/james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/dom/MessageFormatter.java?rev=1136805&r1=1136804&r2=1136805&view=diff
==============================================================================
---
james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/dom/MessageFormatter.java
(original)
+++
james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/dom/MessageFormatter.java
Fri Jun 17 08:31:32 2011
@@ -22,11 +22,23 @@ package org.apache.james.mime4j.dom;
import java.io.IOException;
import java.io.OutputStream;
+import org.apache.james.mime4j.stream.Field;
+
/**
- * Defines the API to write Message to an output stream.
+ * Defines the API to write Message and other DOM objects to an output stream.
*/
public interface MessageFormatter {
void writeMessage(Message message, OutputStream out) throws IOException;
+ void writeBody(Body body, OutputStream out) throws IOException;
+
+ void writeEntity(Entity entity, OutputStream out) throws IOException;
+
+ void writeMultipart(Multipart multipart, OutputStream out) throws
IOException;
+
+ void writeField(Field field, OutputStream out) throws IOException;
+
+ void writeHeader(Header header, OutputStream out) throws IOException;
+
}