james-mime4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1137647 - in /james/mime4j/trunk: benchmark/src/main/java/org/apache/james/mime4j/ dom/src/main/java/org/apache/james/mime4j/message/ dom/src/test/java/org/apache/james/mime4j/dom/ examples/src/main/java/org/apache/james/mime4j/samples/dom...
Date Mon, 20 Jun 2011 15:00:30 GMT
Author: olegk
Date: Mon Jun 20 15:00:29 2011
New Revision: 1137647

URL: http://svn.apache.org/viewvc?rev=1137647&view=rev
Log:
MimeWriter -> DefaultMessageWriter, MimeBuilder -> DefaultMessageBuilder

Added:
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/message/DefaultMessageBuilder.java
      - copied, changed from r1137643, james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/message/MimeBuilder.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/message/DefaultMessageWriter.java
      - copied, changed from r1137644, james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/message/MimeWriter.java
Removed:
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/message/MimeBuilder.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/message/MimeWriter.java
Modified:
    james/mime4j/trunk/benchmark/src/main/java/org/apache/james/mime4j/LongMultipartReadBench.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/message/MessageServiceFactoryImpl.java
    james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/ExampleMessagesRoundtripTest.java
    james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/HeaderTest.java
    james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/MessageCompleteMailTest.java
    james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/MessageHeadlessParserTest.java
    james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/MessageParserTest.java
    james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/MessageTest.java
    james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/MessageWriteToTest.java
    james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/MimeBuilderCopyTest.java
    james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/MultipartFormTest.java
    james/mime4j/trunk/examples/src/main/java/org/apache/james/mime4j/samples/dom/MultipartMessage.java
    james/mime4j/trunk/examples/src/main/java/org/apache/james/mime4j/samples/dom/TextPlainMessage.java
    james/mime4j/trunk/examples/src/main/java/org/apache/james/mime4j/samples/transform/TransformMessage.java
    james/mime4j/trunk/examples/src/main/java/org/apache/james/mime4j/samples/tree/MessageTree.java

Modified: james/mime4j/trunk/benchmark/src/main/java/org/apache/james/mime4j/LongMultipartReadBench.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/benchmark/src/main/java/org/apache/james/mime4j/LongMultipartReadBench.java?rev=1137647&r1=1137646&r2=1137647&view=diff
==============================================================================
--- james/mime4j/trunk/benchmark/src/main/java/org/apache/james/mime4j/LongMultipartReadBench.java
(original)
+++ james/mime4j/trunk/benchmark/src/main/java/org/apache/james/mime4j/LongMultipartReadBench.java
Mon Jun 20 15:00:29 2011
@@ -27,7 +27,7 @@ import java.io.InputStream;
 import org.apache.james.mime4j.codec.CodecUtil;
 import org.apache.james.mime4j.dom.Header;
 import org.apache.james.mime4j.dom.MessageBuilder;
-import org.apache.james.mime4j.message.MimeBuilder;
+import org.apache.james.mime4j.message.DefaultMessageBuilder;
 import org.apache.james.mime4j.message.SimpleContentHandler;
 import org.apache.james.mime4j.parser.AbstractContentHandler;
 import org.apache.james.mime4j.parser.ContentHandler;
@@ -171,7 +171,7 @@ public class LongMultipartReadBench {
     private static final class MessageTest implements Test {
         public void run(byte[] content, int repetitions) throws Exception {
             DefaultStorageProvider.setInstance(new MemoryStorageProvider());
-            MessageBuilder builder = new MimeBuilder();
+            MessageBuilder builder = new DefaultMessageBuilder();
 
             for (int i = 0; i < repetitions; i++) {
                 builder.parseMessage(new ByteArrayInputStream(content));

Copied: james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/message/DefaultMessageBuilder.java
(from r1137643, james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/message/MimeBuilder.java)
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/message/DefaultMessageBuilder.java?p2=james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/message/DefaultMessageBuilder.java&p1=james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/message/MimeBuilder.java&r1=1137643&r2=1137647&rev=1137647&view=diff
==============================================================================
--- james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/message/MimeBuilder.java
(original)
+++ james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/message/DefaultMessageBuilder.java
Mon Jun 20 15:00:29 2011
@@ -46,7 +46,7 @@ import org.apache.james.mime4j.stream.Mu
 /**
  * Utility class for copying message and parsing message elements.
  */
-public class MimeBuilder implements MessageBuilder {
+public class DefaultMessageBuilder implements MessageBuilder {
 
     private FieldParser<? extends ParsedField> fieldParser = null;
     private BodyFactory bodyFactory = null;
@@ -56,7 +56,7 @@ public class MimeBuilder implements Mess
     private boolean flatMode = false;
     private DecodeMonitor monitor = null;
     
-    public MimeBuilder() {
+    public DefaultMessageBuilder() {
         super();
     }
 

Copied: james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/message/DefaultMessageWriter.java
(from r1137644, james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/message/MimeWriter.java)
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/message/DefaultMessageWriter.java?p2=james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/message/DefaultMessageWriter.java&p1=james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/message/MimeWriter.java&r1=1137644&r2=1137647&rev=1137647&view=diff
==============================================================================
--- james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/message/MimeWriter.java (original)
+++ james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/message/DefaultMessageWriter.java
Mon Jun 20 15:00:29 2011
@@ -42,7 +42,7 @@ import org.apache.james.mime4j.util.Mime
 /**
  * Writes a message (or a part of a message) to an output stream.
  */
-public class MimeWriter implements MessageWriter {
+public class DefaultMessageWriter implements MessageWriter {
 
     private static final byte[] CRLF = { '\r', '\n' };
     private static final byte[] DASHES = { '-', '-' };
@@ -50,7 +50,7 @@ public class MimeWriter implements Messa
     /**
      * Protected constructor prevents direct instantiation.
      */
-    public MimeWriter() {
+    public DefaultMessageWriter() {
     }
 
     /**

Modified: james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/message/MessageServiceFactoryImpl.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/message/MessageServiceFactoryImpl.java?rev=1137647&r1=1137646&r2=1137647&view=diff
==============================================================================
--- james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/message/MessageServiceFactoryImpl.java
(original)
+++ james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/message/MessageServiceFactoryImpl.java
Mon Jun 20 15:00:29 2011
@@ -40,7 +40,7 @@ public class MessageServiceFactoryImpl e
 
     @Override
     public MessageBuilder newMessageBuilder() {
-        MimeBuilder m = new MimeBuilder();
+        DefaultMessageBuilder m = new DefaultMessageBuilder();
         if (bodyFactory != null) m.setBodyFactory(bodyFactory);
         if (mimeEntityConfig != null) m.setMimeEntityConfig(mimeEntityConfig);
         if (mutableBodyDescriptorFactory != null) m.setMutableBodyDescriptorFactory(mutableBodyDescriptorFactory);
@@ -51,7 +51,7 @@ public class MessageServiceFactoryImpl e
 
     @Override
     public MessageWriter newMessageWriter() {
-        return new MimeWriter();
+        return new DefaultMessageWriter();
     }
     
     @Override

Modified: james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/ExampleMessagesRoundtripTest.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/ExampleMessagesRoundtripTest.java?rev=1137647&r1=1137646&r2=1137647&view=diff
==============================================================================
--- james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/ExampleMessagesRoundtripTest.java
(original)
+++ james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/ExampleMessagesRoundtripTest.java
Mon Jun 20 15:00:29 2011
@@ -38,8 +38,8 @@ import junit.framework.TestSuite;
 
 import org.apache.james.mime4j.codec.CodecUtil;
 import org.apache.james.mime4j.dom.Message;
-import org.apache.james.mime4j.message.MimeBuilder;
-import org.apache.james.mime4j.message.MimeWriter;
+import org.apache.james.mime4j.message.DefaultMessageBuilder;
+import org.apache.james.mime4j.message.DefaultMessageWriter;
 import org.apache.james.mime4j.stream.MimeEntityConfig;
 
 /**
@@ -62,8 +62,8 @@ public class ExampleMessagesRoundtripTes
             config.setMalformedHeaderStartsBody(true);
         }
         config.setMaxLineLen(-1);
-        MimeBuilder builder = new MimeBuilder();
-        MimeWriter writer = new MimeWriter();
+        DefaultMessageBuilder builder = new DefaultMessageBuilder();
+        DefaultMessageWriter writer = new DefaultMessageWriter();
         builder.setMimeEntityConfig(config);
         Message inputMessage = builder.parseMessage(url.openStream());
         ByteArrayOutputStream out = new ByteArrayOutputStream();

Modified: james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/HeaderTest.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/HeaderTest.java?rev=1137647&r1=1137646&r2=1137647&view=diff
==============================================================================
--- james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/HeaderTest.java (original)
+++ james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/HeaderTest.java Mon Jun
20 15:00:29 2011
@@ -25,7 +25,7 @@ import org.apache.commons.io.output.Byte
 import org.apache.james.mime4j.dom.Header;
 import org.apache.james.mime4j.field.DefaultFieldParser;
 import org.apache.james.mime4j.message.HeaderImpl;
-import org.apache.james.mime4j.message.MimeWriter;
+import org.apache.james.mime4j.message.DefaultMessageWriter;
 import org.apache.james.mime4j.stream.Field;
 import org.apache.james.mime4j.util.ByteArrayBuffer;
 import org.apache.james.mime4j.util.ContentUtil;
@@ -63,7 +63,7 @@ public class HeaderTest extends TestCase
         
         ByteArrayOutputStream outstream = new ByteArrayOutputStream();
         
-        MimeWriter writer = new MimeWriter();
+        DefaultMessageWriter writer = new DefaultMessageWriter();
         writer.writeHeader(header, outstream);
         byte[] b = outstream.toByteArray();
         ByteArrayBuffer buf = new ByteArrayBuffer(b.length);

Modified: james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/MessageCompleteMailTest.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/MessageCompleteMailTest.java?rev=1137647&r1=1137646&r2=1137647&view=diff
==============================================================================
--- james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/MessageCompleteMailTest.java
(original)
+++ james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/MessageCompleteMailTest.java
Mon Jun 20 15:00:29 2011
@@ -25,7 +25,7 @@ import junit.framework.TestCase;
 
 import org.apache.james.mime4j.ExampleMail;
 import org.apache.james.mime4j.dom.Multipart;
-import org.apache.james.mime4j.message.MimeBuilder;
+import org.apache.james.mime4j.message.DefaultMessageBuilder;
 
 public class MessageCompleteMailTest extends TestCase {
 
@@ -55,7 +55,7 @@ public class MessageCompleteMailTest ext
 
     private Message createMessage(byte[] octets) throws Exception {
         ByteArrayInputStream in = new ByteArrayInputStream(octets);
-        MimeBuilder builder = new MimeBuilder();
+        DefaultMessageBuilder builder = new DefaultMessageBuilder();
         Message message = builder.parseMessage(in);
         return message;
     }

Modified: james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/MessageHeadlessParserTest.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/MessageHeadlessParserTest.java?rev=1137647&r1=1137646&r2=1137647&view=diff
==============================================================================
--- james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/MessageHeadlessParserTest.java
(original)
+++ james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/MessageHeadlessParserTest.java
Mon Jun 20 15:00:29 2011
@@ -28,7 +28,7 @@ import org.apache.james.mime4j.dom.Multi
 import org.apache.james.mime4j.dom.TextBody;
 import org.apache.james.mime4j.dom.field.ContentTypeField;
 import org.apache.james.mime4j.dom.field.FieldName;
-import org.apache.james.mime4j.message.MimeBuilder;
+import org.apache.james.mime4j.message.DefaultMessageBuilder;
 import org.apache.james.mime4j.stream.MimeEntityConfig;
 
 public class MessageHeadlessParserTest extends TestCase {
@@ -44,7 +44,7 @@ public class MessageHeadlessParserTest e
 
 		MimeEntityConfig config = new MimeEntityConfig();
 		config.setMalformedHeaderStartsBody(true);
-        MimeBuilder builder = new MimeBuilder();
+        DefaultMessageBuilder builder = new DefaultMessageBuilder();
         builder.setMimeEntityConfig(config);
 		Message message = builder.parseMessage(
 		        new ByteArrayInputStream(headlessContent.getBytes("UTF-8")));
@@ -64,7 +64,7 @@ public class MessageHeadlessParserTest e
 
         MimeEntityConfig config = new MimeEntityConfig();
         config.setMalformedHeaderStartsBody(true);
-        MimeBuilder builder = new MimeBuilder();
+        DefaultMessageBuilder builder = new DefaultMessageBuilder();
         builder.setMimeEntityConfig(config);
         Message message = builder.parseMessage(
                 new ByteArrayInputStream(headlessContent.getBytes("UTF-8")));
@@ -93,7 +93,7 @@ public class MessageHeadlessParserTest e
 
 		MimeEntityConfig config = new MimeEntityConfig();
 		config.setHeadlessParsing(contentType);
-        MimeBuilder builder = new MimeBuilder();
+        DefaultMessageBuilder builder = new DefaultMessageBuilder();
         builder.setMimeEntityConfig(config);
 
 		Message message = builder.parseMessage(

Modified: james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/MessageParserTest.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/MessageParserTest.java?rev=1137647&r1=1137646&r2=1137647&view=diff
==============================================================================
--- james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/MessageParserTest.java
(original)
+++ james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/MessageParserTest.java
Mon Jun 20 15:00:29 2011
@@ -45,7 +45,7 @@ import org.apache.james.mime4j.dom.Multi
 import org.apache.james.mime4j.dom.TextBody;
 import org.apache.james.mime4j.field.FieldsTest;
 import org.apache.james.mime4j.message.MessageImpl;
-import org.apache.james.mime4j.message.MimeBuilder;
+import org.apache.james.mime4j.message.DefaultMessageBuilder;
 import org.apache.james.mime4j.stream.Field;
 import org.apache.james.mime4j.stream.MimeEntityConfig;
 
@@ -108,7 +108,7 @@ public class MessageParserTest extends T
             config.setMalformedHeaderStartsBody(true);
         }
         config.setMaxLineLen(-1);
-        MimeBuilder builder = new MimeBuilder();
+        DefaultMessageBuilder builder = new DefaultMessageBuilder();
         builder.setMimeEntityConfig(config);
         Message m = builder.parseMessage(url.openStream());
         

Modified: james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/MessageTest.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/MessageTest.java?rev=1137647&r1=1137646&r2=1137647&view=diff
==============================================================================
--- james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/MessageTest.java (original)
+++ james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/MessageTest.java Mon
Jun 20 15:00:29 2011
@@ -44,8 +44,8 @@ import org.apache.james.mime4j.field.add
 import org.apache.james.mime4j.message.BodyPart;
 import org.apache.james.mime4j.message.HeaderImpl;
 import org.apache.james.mime4j.message.MessageImpl;
-import org.apache.james.mime4j.message.MimeBuilder;
-import org.apache.james.mime4j.message.MimeWriter;
+import org.apache.james.mime4j.message.DefaultMessageBuilder;
+import org.apache.james.mime4j.message.DefaultMessageWriter;
 import org.apache.james.mime4j.message.MultipartImpl;
 
 public class MessageTest extends TestCase {
@@ -134,8 +134,8 @@ public class MessageTest extends TestCas
     public void testWriteTo() throws Exception {
         byte[] inputByte = getRawMessageAsByteArray();
 
-        MimeBuilder builder = new MimeBuilder();
-        MimeWriter writer = new MimeWriter();
+        DefaultMessageBuilder builder = new DefaultMessageBuilder();
+        DefaultMessageWriter writer = new DefaultMessageWriter();
         
         Message m = builder.parseMessage(new ByteArrayInputStream(inputByte));
         ByteArrayOutputStream out = new ByteArrayOutputStream();
@@ -159,8 +159,8 @@ public class MessageTest extends TestCas
 
         byte[] inputByte = getRawMessageAsByteArray();
 
-        MimeBuilder builder = new MimeBuilder();
-        MimeWriter writer = new MimeWriter();
+        DefaultMessageBuilder builder = new DefaultMessageBuilder();
+        DefaultMessageWriter writer = new DefaultMessageWriter();
         
         Message m = builder.parseMessage(new ByteArrayInputStream(inputByte));
         m.getHeader().addField(DefaultFieldParser.parse(testheader));

Modified: james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/MessageWriteToTest.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/MessageWriteToTest.java?rev=1137647&r1=1137646&r2=1137647&view=diff
==============================================================================
--- james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/MessageWriteToTest.java
(original)
+++ james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/MessageWriteToTest.java
Mon Jun 20 15:00:29 2011
@@ -23,8 +23,8 @@ import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 
 import org.apache.james.mime4j.ExampleMail;
-import org.apache.james.mime4j.message.MimeBuilder;
-import org.apache.james.mime4j.message.MimeWriter;
+import org.apache.james.mime4j.message.DefaultMessageBuilder;
+import org.apache.james.mime4j.message.DefaultMessageWriter;
 
 import junit.framework.TestCase;
 
@@ -44,7 +44,7 @@ public class MessageWriteToTest extends 
         Message message = createMessage(ExampleMail.RFC822_SIMPLE_BYTES);
         assertFalse("Not multipart", message.isMultipart());
         ByteArrayOutputStream out = new ByteArrayOutputStream();
-        MimeWriter writer = new MimeWriter();
+        DefaultMessageWriter writer = new DefaultMessageWriter();
         writer.writeMessage(message, out);
         assertEquals(out.toByteArray(), ExampleMail.RFC822_SIMPLE_BYTES);
     }
@@ -63,7 +63,7 @@ public class MessageWriteToTest extends 
         Message message = createMessage(ExampleMail.MULTIPART_WITH_BINARY_ATTACHMENTS_BYTES);
         assertTrue("Is multipart", message.isMultipart());
         ByteArrayOutputStream out = new ByteArrayOutputStream();
-        MimeWriter writer = new MimeWriter();
+        DefaultMessageWriter writer = new DefaultMessageWriter();
         writer.writeMessage(message, out);
         assertEquals(ExampleMail.MULTIPART_WITH_BINARY_ATTACHMENTS_BYTES, out.toByteArray());
     }
@@ -72,7 +72,7 @@ public class MessageWriteToTest extends 
         Message message = createMessage(ExampleMail.MULTIPART_WITH_BINARY_ATTACHMENTS_NOPREAMBLE_BYTES);
         assertTrue("Is multipart", message.isMultipart());
         ByteArrayOutputStream out = new ByteArrayOutputStream();
-        MimeWriter writer = new MimeWriter();
+        DefaultMessageWriter writer = new DefaultMessageWriter();
         writer.writeMessage(message, out);
         assertEquals(ExampleMail.MULTIPART_WITH_BINARY_ATTACHMENTS_NOPREAMBLE_BYTES, out.toByteArray());
     }
@@ -81,14 +81,14 @@ public class MessageWriteToTest extends 
         Message message = createMessage(ExampleMail.MULTIPART_WITH_BINARY_ATTACHMENTS_PREAMBLE_EPILOGUE_BYTES);
         assertTrue("Is multipart", message.isMultipart());
         ByteArrayOutputStream out = new ByteArrayOutputStream();
-        MimeWriter writer = new MimeWriter();
+        DefaultMessageWriter writer = new DefaultMessageWriter();
         writer.writeMessage(message, out);
         assertEquals(ExampleMail.MULTIPART_WITH_BINARY_ATTACHMENTS_PREAMBLE_EPILOGUE_BYTES,
out.toByteArray());
     }
     
     private Message createMessage(byte[] octets) throws Exception {
         ByteArrayInputStream in = new ByteArrayInputStream(octets);
-        MimeBuilder builder = new MimeBuilder();
+        DefaultMessageBuilder builder = new DefaultMessageBuilder();
         Message message = builder.parseMessage(in);
         return message;
     }

Modified: james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/MimeBuilderCopyTest.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/MimeBuilderCopyTest.java?rev=1137647&r1=1137646&r2=1137647&view=diff
==============================================================================
--- james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/MimeBuilderCopyTest.java
(original)
+++ james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/MimeBuilderCopyTest.java
Mon Jun 20 15:00:29 2011
@@ -31,7 +31,7 @@ import org.apache.james.mime4j.message.B
 import org.apache.james.mime4j.message.BodyPart;
 import org.apache.james.mime4j.message.HeaderImpl;
 import org.apache.james.mime4j.message.MessageImpl;
-import org.apache.james.mime4j.message.MimeBuilder;
+import org.apache.james.mime4j.message.DefaultMessageBuilder;
 import org.apache.james.mime4j.message.MultipartImpl;
 import org.apache.james.mime4j.stream.Field;
 
@@ -42,7 +42,7 @@ public class MimeBuilderCopyTest extends
     public void testCopyEmptyMessage() throws Exception {
         MessageImpl original = new MessageImpl();
 
-        MimeBuilder builder = new MimeBuilder();
+        DefaultMessageBuilder builder = new DefaultMessageBuilder();
         Message copy = builder.copy(original);
 
         assertNull(copy.getHeader());
@@ -60,7 +60,7 @@ public class MimeBuilderCopyTest extends
         original.setBody(body);
         original.setParent(parent);
 
-        MimeBuilder builder = new MimeBuilder();
+        DefaultMessageBuilder builder = new DefaultMessageBuilder();
         Message copy = builder.copy(original);
 
         assertNotNull(copy.getHeader());
@@ -77,7 +77,7 @@ public class MimeBuilderCopyTest extends
     public void testCopyEmptyBodyPart() throws Exception {
         BodyPart original = new BodyPart();
 
-        MimeBuilder builder = new MimeBuilder();
+        DefaultMessageBuilder builder = new DefaultMessageBuilder();
         BodyPart copy = builder.copy(original);
 
         assertNull(copy.getHeader());
@@ -95,7 +95,7 @@ public class MimeBuilderCopyTest extends
         original.setBody(body);
         original.setParent(parent);
 
-        MimeBuilder builder = new MimeBuilder();
+        DefaultMessageBuilder builder = new DefaultMessageBuilder();
         BodyPart copy = builder.copy(original);
 
         assertNotNull(copy.getHeader());
@@ -112,7 +112,7 @@ public class MimeBuilderCopyTest extends
     public void testCopyEmptyMultipart() throws Exception {
         Multipart original = new MultipartImpl("mixed");
 
-        MimeBuilder builder = new MimeBuilder();
+        DefaultMessageBuilder builder = new DefaultMessageBuilder();
         Multipart copy = builder.copy(original);
 
         assertSame(original.getPreamble(), copy.getPreamble());
@@ -132,7 +132,7 @@ public class MimeBuilderCopyTest extends
         original.setParent(parent);
         original.addBodyPart(bodyPart);
 
-        MimeBuilder builder = new MimeBuilder();
+        DefaultMessageBuilder builder = new DefaultMessageBuilder();
         Multipart copy = builder.copy(original);
 
         assertSame(original.getPreamble(), copy.getPreamble());
@@ -160,7 +160,7 @@ public class MimeBuilderCopyTest extends
         original.setHeader(new HeaderImpl());
         original.setBody(multipart);
 
-        MimeBuilder builder = new MimeBuilder();
+        DefaultMessageBuilder builder = new DefaultMessageBuilder();
         Message copy = builder.copy(original);
 
         Multipart multipartCopy = (Multipart) copy.getBody();
@@ -187,7 +187,7 @@ public class MimeBuilderCopyTest extends
         original.addField(f2);
         original.addField(f3);
 
-        MimeBuilder builder = new MimeBuilder();
+        DefaultMessageBuilder builder = new DefaultMessageBuilder();
         Header copy = builder.copy(original);
 
         // copy must have same fields as original

Modified: james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/MultipartFormTest.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/MultipartFormTest.java?rev=1137647&r1=1137646&r2=1137647&view=diff
==============================================================================
--- james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/MultipartFormTest.java
(original)
+++ james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/MultipartFormTest.java
Mon Jun 20 15:00:29 2011
@@ -30,7 +30,7 @@ import org.apache.james.mime4j.message.B
 import org.apache.james.mime4j.message.BodyPart;
 import org.apache.james.mime4j.message.HeaderImpl;
 import org.apache.james.mime4j.message.MessageImpl;
-import org.apache.james.mime4j.message.MimeWriter;
+import org.apache.james.mime4j.message.DefaultMessageWriter;
 import org.apache.james.mime4j.message.MultipartImpl;
 
 public class MultipartFormTest extends TestCase {
@@ -67,7 +67,7 @@ public class MultipartFormTest extends T
         multipart.addBodyPart(p3);
         
         ByteArrayOutputStream out = new ByteArrayOutputStream();
-        MimeWriter writer = new MimeWriter();
+        DefaultMessageWriter writer = new DefaultMessageWriter();
         writer.writeMultipart(multipart, out);
         out.close();
         

Modified: james/mime4j/trunk/examples/src/main/java/org/apache/james/mime4j/samples/dom/MultipartMessage.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/examples/src/main/java/org/apache/james/mime4j/samples/dom/MultipartMessage.java?rev=1137647&r1=1137646&r2=1137647&view=diff
==============================================================================
--- james/mime4j/trunk/examples/src/main/java/org/apache/james/mime4j/samples/dom/MultipartMessage.java
(original)
+++ james/mime4j/trunk/examples/src/main/java/org/apache/james/mime4j/samples/dom/MultipartMessage.java
Mon Jun 20 15:00:29 2011
@@ -36,7 +36,7 @@ import org.apache.james.mime4j.dom.TextB
 import org.apache.james.mime4j.field.address.AddressBuilder;
 import org.apache.james.mime4j.message.BodyPart;
 import org.apache.james.mime4j.message.MessageImpl;
-import org.apache.james.mime4j.message.MimeWriter;
+import org.apache.james.mime4j.message.DefaultMessageWriter;
 import org.apache.james.mime4j.message.MultipartImpl;
 import org.apache.james.mime4j.storage.Storage;
 import org.apache.james.mime4j.storage.StorageBodyFactory;
@@ -90,7 +90,7 @@ public class MultipartMessage {
 
         // 4) print message to standard output
 
-        MessageWriter writer = new MimeWriter();
+        MessageWriter writer = new DefaultMessageWriter();
         writer.writeMessage(message, System.out);
 
         // 5) message is no longer needed and should be disposed of

Modified: james/mime4j/trunk/examples/src/main/java/org/apache/james/mime4j/samples/dom/TextPlainMessage.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/examples/src/main/java/org/apache/james/mime4j/samples/dom/TextPlainMessage.java?rev=1137647&r1=1137646&r2=1137647&view=diff
==============================================================================
--- james/mime4j/trunk/examples/src/main/java/org/apache/james/mime4j/samples/dom/TextPlainMessage.java
(original)
+++ james/mime4j/trunk/examples/src/main/java/org/apache/james/mime4j/samples/dom/TextPlainMessage.java
Mon Jun 20 15:00:29 2011
@@ -27,7 +27,7 @@ import org.apache.james.mime4j.dom.TextB
 import org.apache.james.mime4j.field.address.AddressBuilder;
 import org.apache.james.mime4j.field.address.ParseException;
 import org.apache.james.mime4j.message.MessageImpl;
-import org.apache.james.mime4j.message.MimeWriter;
+import org.apache.james.mime4j.message.DefaultMessageWriter;
 import org.apache.james.mime4j.storage.StorageBodyFactory;
 
 /**
@@ -64,7 +64,7 @@ public class TextPlainMessage {
 
         // 4) print message to standard output
 
-        MessageWriter writer = new MimeWriter();
+        MessageWriter writer = new DefaultMessageWriter();
         writer.writeMessage(message, System.out);
 
         // 5) message is no longer needed and should be disposed of

Modified: james/mime4j/trunk/examples/src/main/java/org/apache/james/mime4j/samples/transform/TransformMessage.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/examples/src/main/java/org/apache/james/mime4j/samples/transform/TransformMessage.java?rev=1137647&r1=1137646&r2=1137647&view=diff
==============================================================================
--- james/mime4j/trunk/examples/src/main/java/org/apache/james/mime4j/samples/transform/TransformMessage.java
(original)
+++ james/mime4j/trunk/examples/src/main/java/org/apache/james/mime4j/samples/transform/TransformMessage.java
Mon Jun 20 15:00:29 2011
@@ -35,8 +35,8 @@ import org.apache.james.mime4j.dom.field
 import org.apache.james.mime4j.field.address.AddressBuilder;
 import org.apache.james.mime4j.message.BodyPart;
 import org.apache.james.mime4j.message.MessageImpl;
-import org.apache.james.mime4j.message.MimeBuilder;
-import org.apache.james.mime4j.message.MimeWriter;
+import org.apache.james.mime4j.message.DefaultMessageBuilder;
+import org.apache.james.mime4j.message.DefaultMessageWriter;
 import org.apache.james.mime4j.message.MultipartImpl;
 import org.apache.james.mime4j.storage.DefaultStorageProvider;
 import org.apache.james.mime4j.storage.StorageBodyFactory;
@@ -66,7 +66,7 @@ public class TransformMessage {
         // Create a new message by transforming the template.
         Message transformed = transform(template);
 
-        MessageWriter writer = new MimeWriter();
+        MessageWriter writer = new DefaultMessageWriter();
         
         // Print transformed message.
         System.out.println("\n\nTransformed message:\n--------------------\n");
@@ -96,7 +96,7 @@ public class TransformMessage {
     private static Message transform(Message original) throws IOException, ParseException
{
         // Create a copy of the template. The copy can be modified without
         // affecting the original.
-        MessageBuilder builder = new MimeBuilder();
+        MessageBuilder builder = new DefaultMessageBuilder();
         Message message = builder.newMessage(original);
 
         // In this example we know we have a multipart message. Use

Modified: james/mime4j/trunk/examples/src/main/java/org/apache/james/mime4j/samples/tree/MessageTree.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/examples/src/main/java/org/apache/james/mime4j/samples/tree/MessageTree.java?rev=1137647&r1=1137646&r2=1137647&view=diff
==============================================================================
--- james/mime4j/trunk/examples/src/main/java/org/apache/james/mime4j/samples/tree/MessageTree.java
(original)
+++ james/mime4j/trunk/examples/src/main/java/org/apache/james/mime4j/samples/tree/MessageTree.java
Mon Jun 20 15:00:29 2011
@@ -58,7 +58,7 @@ import org.apache.james.mime4j.dom.field
 import org.apache.james.mime4j.field.address.AddressFormatter;
 import org.apache.james.mime4j.message.BodyPart;
 import org.apache.james.mime4j.message.MessageImpl;
-import org.apache.james.mime4j.message.MimeBuilder;
+import org.apache.james.mime4j.message.DefaultMessageBuilder;
 import org.apache.james.mime4j.stream.Field;
 
 /**
@@ -366,7 +366,7 @@ public class MessageTree extends JPanel 
 
     public static void main(String[] args) {
         try {
-            final MessageBuilder builder = new MimeBuilder();
+            final MessageBuilder builder = new DefaultMessageBuilder();
             final Message message = builder.parseMessage(new FileInputStream(args[0]));
 
             javax.swing.SwingUtilities.invokeLater(new Runnable() {



Mime
View raw message