james-mime4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r906218 - in /james/mime4j/trunk: benchmark/src/main/java/org/apache/james/mime4j/ core/src/main/java/org/apache/james/mime4j/ core/src/main/java/org/apache/james/mime4j/message/ core/src/main/java/org/apache/james/mime4j/parser/ core/src/m...
Date Wed, 03 Feb 2010 20:15:31 GMT
Author: olegk
Date: Wed Feb  3 20:15:30 2010
New Revision: 906218

URL: http://svn.apache.org/viewvc?rev=906218&view=rev
Log:
MIME4J-129, MIME4J-157: Moved ContentHandler and AbstractContentHandler to 'parser' package

Added:
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/parser/AbstractContentHandler.java
      - copied, changed from r906174, james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/stream/AbstractContentHandler.java
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/parser/ContentHandler.java
      - copied, changed from r906174, james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/stream/ContentHandler.java
    james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/parser/MimeStreamParserExampleMessagesTest.java
      - copied, changed from r906208, james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/stream/MimeStreamParserExampleMessagesTest.java
    james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/parser/MimeStreamParserTest.java
      - copied, changed from r906208, james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/stream/MimeStreamParserTest.java
    james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/parser/TestHandler.java
      - copied, changed from r906208, james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/stream/TestHandler.java
Removed:
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/stream/AbstractContentHandler.java
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/stream/ContentHandler.java
    james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/stream/MimeStreamParserExampleMessagesTest.java
    james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/stream/MimeStreamParserTest.java
    james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/stream/TestHandler.java
Modified:
    james/mime4j/trunk/benchmark/src/main/java/org/apache/james/mime4j/LongMultipartReadBench.java
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/MimeException.java
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/message/HeaderImpl.java
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/message/MessageBuilder.java
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/message/SimpleContentHandler.java
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/parser/MimeStreamParser.java
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/stream/MimeTokenStream.java
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/util/StringArrayMap.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=906218&r1=906217&r2=906218&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
Wed Feb  3 20:15:30 2010
@@ -28,12 +28,12 @@
 import org.apache.james.mime4j.dom.Header;
 import org.apache.james.mime4j.message.MessageImpl;
 import org.apache.james.mime4j.message.SimpleContentHandler;
+import org.apache.james.mime4j.parser.AbstractContentHandler;
+import org.apache.james.mime4j.parser.ContentHandler;
 import org.apache.james.mime4j.parser.MimeStreamParser;
 import org.apache.james.mime4j.storage.DefaultStorageProvider;
 import org.apache.james.mime4j.storage.MemoryStorageProvider;
-import org.apache.james.mime4j.stream.AbstractContentHandler;
 import org.apache.james.mime4j.stream.BodyDescriptor;
-import org.apache.james.mime4j.stream.ContentHandler;
 import org.apache.james.mime4j.stream.MimeTokenStream;
 
 public class LongMultipartReadBench {

Modified: james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/MimeException.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/MimeException.java?rev=906218&r1=906217&r2=906218&view=diff
==============================================================================
--- james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/MimeException.java (original)
+++ james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/MimeException.java Wed Feb
 3 20:15:30 2010
@@ -22,7 +22,7 @@
 /**
  * MIME processing exception.
  * <p>
- * A <code>MimeException</code> may be thrown by a {@link org.apache.james.mime4j.stream.ContentHandler}
to
+ * A <code>MimeException</code> may be thrown by a {@link org.apache.james.mime4j.parser.ContentHandler}
to
  * indicate that it has failed to process a message event and that no further
  * events should be generated.
  * <p>

Modified: james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/message/HeaderImpl.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/message/HeaderImpl.java?rev=906218&r1=906217&r2=906218&view=diff
==============================================================================
--- james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/message/HeaderImpl.java
(original)
+++ james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/message/HeaderImpl.java
Wed Feb  3 20:15:30 2010
@@ -27,8 +27,8 @@
 import org.apache.james.mime4j.dom.Header;
 import org.apache.james.mime4j.dom.field.Field;
 import org.apache.james.mime4j.field.DefaultFieldParser;
+import org.apache.james.mime4j.parser.AbstractContentHandler;
 import org.apache.james.mime4j.parser.MimeStreamParser;
-import org.apache.james.mime4j.stream.AbstractContentHandler;
 import org.apache.james.mime4j.stream.RawField;
 
 /**

Modified: james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/message/MessageBuilder.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/message/MessageBuilder.java?rev=906218&r1=906217&r2=906218&view=diff
==============================================================================
--- james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/message/MessageBuilder.java
(original)
+++ james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/message/MessageBuilder.java
Wed Feb  3 20:15:30 2010
@@ -33,9 +33,9 @@
 import org.apache.james.mime4j.dom.field.Field;
 import org.apache.james.mime4j.field.DefaultFieldParser;
 import org.apache.james.mime4j.field.LoggingMonitor;
+import org.apache.james.mime4j.parser.ContentHandler;
 import org.apache.james.mime4j.storage.StorageProvider;
 import org.apache.james.mime4j.stream.BodyDescriptor;
-import org.apache.james.mime4j.stream.ContentHandler;
 import org.apache.james.mime4j.stream.RawField;
 import org.apache.james.mime4j.util.ByteArrayBuffer;
 import org.apache.james.mime4j.util.ByteSequence;
@@ -75,7 +75,7 @@
     }
     
     /**
-     * @see org.apache.james.mime4j.stream.ContentHandler#startMessage()
+     * @see org.apache.james.mime4j.parser.ContentHandler#startMessage()
      */
     public void startMessage() throws MimeException {
         if (stack.isEmpty()) {
@@ -89,7 +89,7 @@
     }
     
     /**
-     * @see org.apache.james.mime4j.stream.ContentHandler#endMessage()
+     * @see org.apache.james.mime4j.parser.ContentHandler#endMessage()
      */
     public void endMessage() throws MimeException {
         expect(Message.class);
@@ -97,14 +97,14 @@
     }
     
     /**
-     * @see org.apache.james.mime4j.stream.ContentHandler#startHeader()
+     * @see org.apache.james.mime4j.parser.ContentHandler#startHeader()
      */
     public void startHeader() throws MimeException {
         stack.push(new Header());
     }
     
     /**
-     * @see org.apache.james.mime4j.stream.ContentHandler#field(RawField)
+     * @see org.apache.james.mime4j.parser.ContentHandler#field(RawField)
      */
     public void field(RawField field) throws MimeException {
         expect(Header.class);
@@ -113,7 +113,7 @@
     }
     
     /**
-     * @see org.apache.james.mime4j.stream.ContentHandler#endHeader()
+     * @see org.apache.james.mime4j.parser.ContentHandler#endHeader()
      */
     public void endHeader() throws MimeException {
         expect(Header.class);
@@ -123,7 +123,7 @@
     }
     
     /**
-     * @see org.apache.james.mime4j.stream.ContentHandler#startMultipart(org.apache.james.mime4j.stream.BodyDescriptor)
+     * @see org.apache.james.mime4j.parser.ContentHandler#startMultipart(org.apache.james.mime4j.stream.BodyDescriptor)
      */
     public void startMultipart(final BodyDescriptor bd) throws MimeException {
         expect(Entity.class);
@@ -136,7 +136,7 @@
     }
     
     /**
-     * @see org.apache.james.mime4j.stream.ContentHandler#body(org.apache.james.mime4j.stream.BodyDescriptor,
java.io.InputStream)
+     * @see org.apache.james.mime4j.parser.ContentHandler#body(org.apache.james.mime4j.stream.BodyDescriptor,
java.io.InputStream)
      */
     public void body(BodyDescriptor bd, final InputStream is) throws MimeException, IOException
{
         expect(Entity.class);
@@ -171,14 +171,14 @@
     }
     
     /**
-     * @see org.apache.james.mime4j.stream.ContentHandler#endMultipart()
+     * @see org.apache.james.mime4j.parser.ContentHandler#endMultipart()
      */
     public void endMultipart() throws MimeException {
         stack.pop();
     }
     
     /**
-     * @see org.apache.james.mime4j.stream.ContentHandler#startBodyPart()
+     * @see org.apache.james.mime4j.parser.ContentHandler#startBodyPart()
      */
     public void startBodyPart() throws MimeException {
         expect(Multipart.class);
@@ -189,7 +189,7 @@
     }
     
     /**
-     * @see org.apache.james.mime4j.stream.ContentHandler#endBodyPart()
+     * @see org.apache.james.mime4j.parser.ContentHandler#endBodyPart()
      */
     public void endBodyPart() throws MimeException {
         expect(BodyPart.class);
@@ -197,7 +197,7 @@
     }
     
     /**
-     * @see org.apache.james.mime4j.stream.ContentHandler#epilogue(java.io.InputStream)
+     * @see org.apache.james.mime4j.parser.ContentHandler#epilogue(java.io.InputStream)
      */
     public void epilogue(InputStream is) throws MimeException, IOException {
         expect(MultipartImpl.class);
@@ -206,7 +206,7 @@
     }
     
     /**
-     * @see org.apache.james.mime4j.stream.ContentHandler#preamble(java.io.InputStream)
+     * @see org.apache.james.mime4j.parser.ContentHandler#preamble(java.io.InputStream)
      */
     public void preamble(InputStream is) throws MimeException, IOException {
         expect(MultipartImpl.class);
@@ -216,7 +216,7 @@
     
     /**
      * Unsupported.
-     * @see org.apache.james.mime4j.stream.ContentHandler#raw(java.io.InputStream)
+     * @see org.apache.james.mime4j.parser.ContentHandler#raw(java.io.InputStream)
      */
     public void raw(InputStream is) throws MimeException, IOException {
         throw new UnsupportedOperationException("Not supported");

Modified: james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/message/SimpleContentHandler.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/message/SimpleContentHandler.java?rev=906218&r1=906217&r2=906218&view=diff
==============================================================================
--- james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/message/SimpleContentHandler.java
(original)
+++ james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/message/SimpleContentHandler.java
Wed Feb  3 20:15:30 2010
@@ -23,7 +23,7 @@
 import org.apache.james.mime4j.dom.Header;
 import org.apache.james.mime4j.dom.field.Field;
 import org.apache.james.mime4j.field.DefaultFieldParser;
-import org.apache.james.mime4j.stream.AbstractContentHandler;
+import org.apache.james.mime4j.parser.AbstractContentHandler;
 import org.apache.james.mime4j.stream.RawField;
 
 /**
@@ -45,7 +45,7 @@
     private Header currHeader;
 
     /**
-     * @see org.apache.james.mime4j.stream.AbstractContentHandler#startHeader()
+     * @see org.apache.james.mime4j.parser.AbstractContentHandler#startHeader()
      */
     @Override
     public final void startHeader() {
@@ -53,7 +53,7 @@
     }
 
     /**
-     * @see org.apache.james.mime4j.stream.AbstractContentHandler#field(RawField)
+     * @see org.apache.james.mime4j.parser.AbstractContentHandler#field(RawField)
      */
     @Override
     public final void field(RawField field) throws MimeException {
@@ -62,7 +62,7 @@
     }
 
     /**
-     * @see org.apache.james.mime4j.stream.AbstractContentHandler#endHeader()
+     * @see org.apache.james.mime4j.parser.AbstractContentHandler#endHeader()
      */
     @Override
     public final void endHeader() {

Copied: james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/parser/AbstractContentHandler.java
(from r906174, james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/stream/AbstractContentHandler.java)
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/parser/AbstractContentHandler.java?p2=james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/parser/AbstractContentHandler.java&p1=james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/stream/AbstractContentHandler.java&r1=906174&r2=906218&rev=906218&view=diff
==============================================================================
--- james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/stream/AbstractContentHandler.java
(original)
+++ james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/parser/AbstractContentHandler.java
Wed Feb  3 20:15:30 2010
@@ -17,9 +17,11 @@
  * under the License.                                           *
  ****************************************************************/
 
-package org.apache.james.mime4j.stream;
+package org.apache.james.mime4j.parser;
 
 import org.apache.james.mime4j.MimeException;
+import org.apache.james.mime4j.stream.BodyDescriptor;
+import org.apache.james.mime4j.stream.RawField;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -32,82 +34,43 @@
  */
 public abstract class AbstractContentHandler implements ContentHandler {
     
-    /**
-     * @see org.apache.james.mime4j.stream.ContentHandler#endMultipart()
-     */
     public void endMultipart() throws MimeException {
     }
     
-    /**
-     * @see org.apache.james.mime4j.stream.ContentHandler#startMultipart(org.apache.james.mime4j.stream.BodyDescriptor)
-     */
     public void startMultipart(BodyDescriptor bd) throws MimeException {
     }
     
-    /**
-     * @see org.apache.james.mime4j.stream.ContentHandler#body(org.apache.james.mime4j.stream.BodyDescriptor,
java.io.InputStream)
-     */
     public void body(BodyDescriptor bd, InputStream is)
             throws MimeException, IOException {
     }
     
-    /**
-     * @see org.apache.james.mime4j.stream.ContentHandler#endBodyPart()
-     */
     public void endBodyPart() throws MimeException {
     }
     
-    /**
-     * @see org.apache.james.mime4j.stream.ContentHandler#endHeader()
-     */
     public void endHeader() throws MimeException {
     }
     
-    /**
-     * @see org.apache.james.mime4j.stream.ContentHandler#endMessage()
-     */
     public void endMessage() throws MimeException {
     }
     
-    /**
-     * @see org.apache.james.mime4j.stream.ContentHandler#epilogue(java.io.InputStream)
-     */
     public void epilogue(InputStream is) throws MimeException, IOException {
     }
     
-    /**
-     * @see org.apache.james.mime4j.stream.ContentHandler#field(RawField)
-     */
     public void field(RawField field) throws MimeException {
     }
     
-    /**
-     * @see org.apache.james.mime4j.stream.ContentHandler#preamble(java.io.InputStream)
-     */
     public void preamble(InputStream is) throws MimeException, IOException {
     }
     
-    /**
-     * @see org.apache.james.mime4j.stream.ContentHandler#startBodyPart()
-     */
     public void startBodyPart() throws MimeException {
     }
     
-    /**
-     * @see org.apache.james.mime4j.stream.ContentHandler#startHeader()
-     */
     public void startHeader() throws MimeException {
     }
     
-    /**
-     * @see org.apache.james.mime4j.stream.ContentHandler#startMessage()
-     */
     public void startMessage() throws MimeException {
     }
     
-    /**
-     * @see org.apache.james.mime4j.stream.ContentHandler#raw(java.io.InputStream)
-     */
     public void raw(InputStream is) throws MimeException, IOException {
     }
 

Copied: james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/parser/ContentHandler.java
(from r906174, james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/stream/ContentHandler.java)
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/parser/ContentHandler.java?p2=james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/parser/ContentHandler.java&p1=james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/stream/ContentHandler.java&r1=906174&r2=906218&rev=906218&view=diff
==============================================================================
--- james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/stream/ContentHandler.java
(original)
+++ james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/parser/ContentHandler.java
Wed Feb  3 20:15:30 2010
@@ -17,9 +17,11 @@
  * under the License.                                           *
  ****************************************************************/
 
-package org.apache.james.mime4j.stream;
+package org.apache.james.mime4j.parser;
 
 import org.apache.james.mime4j.MimeException;
+import org.apache.james.mime4j.stream.BodyDescriptor;
+import org.apache.james.mime4j.stream.RawField;
 
 import java.io.IOException;
 import java.io.InputStream;

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=906218&r1=906217&r2=906218&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
Wed Feb  3 20:15:30 2010
@@ -27,7 +27,6 @@
 import org.apache.james.mime4j.MimeException;
 import org.apache.james.mime4j.codec.DecodeMonitor;
 import org.apache.james.mime4j.stream.BodyDescriptor;
-import org.apache.james.mime4j.stream.ContentHandler;
 import org.apache.james.mime4j.stream.MimeEntityConfig;
 import org.apache.james.mime4j.stream.MimeTokenStream;
 import org.apache.james.mime4j.stream.MutableBodyDescriptorFactory;

Modified: james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/stream/MimeTokenStream.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/stream/MimeTokenStream.java?rev=906218&r1=906217&r2=906218&view=diff
==============================================================================
--- james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/stream/MimeTokenStream.java
(original)
+++ james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/stream/MimeTokenStream.java
Wed Feb  3 20:15:30 2010
@@ -232,14 +232,8 @@
     /**
      * Finishes the parsing and stops reading lines.
      * NOTE: No more lines will be parsed but the parser
-     * will still call 
-     * {@link ContentHandler#endMultipart()},
-     * {@link ContentHandler#endBodyPart()},
-     * {@link ContentHandler#endMessage()}, etc to match previous calls
-     * to 
-     * {@link ContentHandler#startMultipart(BodyDescriptor)},
-     * {@link ContentHandler#startBodyPart()},
-     * {@link ContentHandler#startMessage()}, etc.
+     * will still trigger 'end' events to match previously 
+     * triggered 'start' events.
      */
     public void stop() {
         rootentity.stop();

Modified: james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/util/StringArrayMap.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/util/StringArrayMap.java?rev=906218&r1=906217&r2=906218&view=diff
==============================================================================
--- james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/util/StringArrayMap.java
(original)
+++ james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/util/StringArrayMap.java
Wed Feb  3 20:15:30 2010
@@ -36,7 +36,7 @@
  * <p>
  * Note that this class is not directly used anywhere in Mime4j.
  * Instead a user might choose to use it instead of {@link org.apache.james.mime4j.dom.Header}
- * and {@link org.apache.james.mime4j.dom.field.Field} in a custom {@link org.apache.james.mime4j.stream.ContentHandler}
implementation.
+ * and {@link org.apache.james.mime4j.dom.field.Field} in a custom {@link org.apache.james.mime4j.parser.ContentHandler}
implementation.
  * See also MIME4j-24.
  */
 public class StringArrayMap implements Serializable {

Copied: james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/parser/MimeStreamParserExampleMessagesTest.java
(from r906208, james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/stream/MimeStreamParserExampleMessagesTest.java)
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/parser/MimeStreamParserExampleMessagesTest.java?p2=james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/parser/MimeStreamParserExampleMessagesTest.java&p1=james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/stream/MimeStreamParserExampleMessagesTest.java&r1=906208&r2=906218&rev=906218&view=diff
==============================================================================
--- james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/stream/MimeStreamParserExampleMessagesTest.java
(original)
+++ james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/parser/MimeStreamParserExampleMessagesTest.java
Wed Feb  3 20:15:30 2010
@@ -17,7 +17,7 @@
  * under the License.                                           *
  ****************************************************************/
 
-package org.apache.james.mime4j.stream;
+package org.apache.james.mime4j.parser;
 
 import java.io.File;
 import java.io.FileInputStream;
@@ -33,6 +33,7 @@
 
 import org.apache.commons.io.IOUtils;
 import org.apache.james.mime4j.parser.MimeStreamParser;
+import org.apache.james.mime4j.stream.MimeEntityConfig;
 import org.apache.log4j.BasicConfigurator;
 
 /**
@@ -65,7 +66,7 @@
         TestHandler handler = null;
         MimeEntityConfig config = new MimeEntityConfig();
         if (getName().startsWith("malformedHeaderStartsBody")) {
-        	config.setMalformedHeaderStartsBody(true);
+            config.setMalformedHeaderStartsBody(true);
         }
         config.setMaxLineLen(-1);
         parser = new MimeStreamParser(config);
@@ -104,14 +105,14 @@
             super();
             URL resource = MimeStreamParserExampleMessagesTestSuite.class.getResource(TESTS_FOLDER);
             if (resource != null) {
-				File dir = new File(resource.toURI());
-	            File[] files = dir.listFiles();
-	            
-	            for (File f : files) {
-	                if (f.getName().toLowerCase().endsWith(".msg")) {
-	                    addTest(new MimeStreamParserExampleMessagesTest(f.getName().substring(0,
f.getName().length()-4), f));
-	                }
-	            }
+                File dir = new File(resource.toURI());
+                File[] files = dir.listFiles();
+                
+                for (File f : files) {
+                    if (f.getName().toLowerCase().endsWith(".msg")) {
+                        addTest(new MimeStreamParserExampleMessagesTest(f.getName().substring(0,
f.getName().length()-4), f));
+                    }
+                }
             }
         }
         

Copied: james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/parser/MimeStreamParserTest.java
(from r906208, james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/stream/MimeStreamParserTest.java)
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/parser/MimeStreamParserTest.java?p2=james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/parser/MimeStreamParserTest.java&p1=james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/stream/MimeStreamParserTest.java&r1=906208&r2=906218&rev=906218&view=diff
==============================================================================
--- james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/stream/MimeStreamParserTest.java
(original)
+++ james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/parser/MimeStreamParserTest.java
Wed Feb  3 20:15:30 2010
@@ -17,7 +17,7 @@
  * under the License.                                           *
  ****************************************************************/
 
-package org.apache.james.mime4j.stream;
+package org.apache.james.mime4j.parser;
 
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
@@ -26,7 +26,10 @@
 
 import junit.framework.TestCase;
 
+import org.apache.james.mime4j.parser.AbstractContentHandler;
 import org.apache.james.mime4j.parser.MimeStreamParser;
+import org.apache.james.mime4j.stream.BodyDescriptor;
+import org.apache.james.mime4j.stream.RawField;
 import org.apache.james.mime4j.util.ByteSequence;
 import org.apache.james.mime4j.util.ContentUtil;
 import org.apache.log4j.BasicConfigurator;

Copied: james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/parser/TestHandler.java
(from r906208, james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/stream/TestHandler.java)
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/parser/TestHandler.java?p2=james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/parser/TestHandler.java&p1=james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/stream/TestHandler.java&r1=906208&r2=906218&rev=906218&view=diff
==============================================================================
--- james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/stream/TestHandler.java
(original)
+++ james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/parser/TestHandler.java
Wed Feb  3 20:15:30 2010
@@ -17,11 +17,14 @@
  * under the License.                                           *
  ****************************************************************/
 
-package org.apache.james.mime4j.stream;
+package org.apache.james.mime4j.parser;
 
 import java.io.IOException;
 import java.io.InputStream;
 
+import org.apache.james.mime4j.parser.ContentHandler;
+import org.apache.james.mime4j.stream.BodyDescriptor;
+import org.apache.james.mime4j.stream.RawField;
 import org.apache.james.mime4j.util.ContentUtil;
 
 /**



Mime
View raw message