You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mime4j-dev@james.apache.org by ol...@apache.org on 2011/07/11 21:48:57 UTC

svn commit: r1145308 [1/7] - in /james/mime4j/trunk: core/src/main/java/org/apache/james/mime4j/ core/src/main/java/org/apache/james/mime4j/codec/ core/src/main/java/org/apache/james/mime4j/io/ core/src/main/java/org/apache/james/mime4j/parser/ core/sr...

Author: olegk
Date: Mon Jul 11 19:48:50 2011
New Revision: 1145308

URL: http://svn.apache.org/viewvc?rev=1145308&view=rev
Log:
TABS -> SPACES

Modified:
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/MimeException.java
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/MimeIOException.java
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/codec/Base64OutputStream.java
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/codec/CodecUtil.java
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/codec/DecodeMonitor.java
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/codec/DecoderUtil.java
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/codec/EncoderUtil.java
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/codec/QuotedPrintableInputStream.java
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/codec/QuotedPrintableOutputStream.java
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/io/BufferedLineReaderInputStream.java
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/io/EOLConvertingInputStream.java
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/io/LimitedInputStream.java
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/io/LineNumberInputStream.java
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/io/LineNumberSource.java
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/io/LineReaderInputStream.java
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/io/LineReaderInputStreamAdaptor.java
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/io/MaxHeaderLimitException.java
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/io/MimeBoundaryInputStream.java
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/io/PositionInputStream.java
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/parser/AbstractContentHandler.java
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/parser/ContentHandler.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/BodyDescriptor.java
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/stream/ContentDescriptor.java
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/stream/DefaultFieldBuilder.java
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/stream/EntityState.java
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/stream/EntityStateMachine.java
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/stream/Event.java
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/stream/FallbackBodyDescriptorBuilder.java
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/stream/Field.java
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/stream/FieldBuilder.java
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/stream/LenientFieldBuilder.java
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/stream/MimeEntity.java
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/stream/MimeEntityConfig.java
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/stream/MimeParseEventException.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/stream/RawEntity.java
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/stream/RawField.java
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/stream/RecursionMode.java
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/util/ByteArrayBuffer.java
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/util/ByteSequence.java
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/util/CharsetUtil.java
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/util/ContentUtil.java
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/util/EmptyByteSequence.java
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/util/LangUtils.java
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/util/MimeUtil.java
    james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/EncodeUtils.java
    james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/ExampleMail.java
    james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/TestUtil.java
    james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/codec/Base64InputStreamTest.java
    james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/codec/Base64OutputStreamTest.java
    james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/codec/CodecUtilTest.java
    james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/codec/DecoderUtilTest.java
    james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/codec/QuotedPrintableEncodeTest.java
    james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/codec/QuotedPrintableInputStreamTest.java
    james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/codec/QuotedPrintableOutputStreamTest.java
    james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/codec/QuotedPrintableTextEncodeTest.java
    james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/io/BufferedLineReaderInputStreamBufferTest.java
    james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/io/BufferedLineReaderInputStreamTest.java
    james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/io/EOLConvertingInputStreamTest.java
    james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/io/LimitedInputStreamTest.java
    james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/io/LineReaderInputStreamAdaptorTest.java
    james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/io/MimeBoundaryInputStreamTest.java
    james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/io/PositionInputStreamTest.java
    james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/parser/MimeStreamParserExampleMessagesTest.java
    james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/parser/MimeStreamParserTest.java
    james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/parser/TestHandler.java
    james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/stream/DefaultFieldBuilderTest.java
    james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/stream/FallbackBodyDescriptorBuilderTest.java
    james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/stream/LenientFieldBuilderTest.java
    james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/stream/MimeStreamTokenMessageRfc822Test.java
    james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/stream/MimeTokenEmbeddedMessageTest.java
    james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/stream/MimeTokenNoRecurseTest.java
    james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/stream/MimeTokenStreamBodyDescriptorTest.java
    james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/stream/MimeTokenStreamReaderTest.java
    james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/stream/MimeTokenStreamTest.java
    james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/stream/MultipartStreamTest.java
    james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/stream/MultipartTokensTest.java
    james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/stream/StrictMimeTokenStreamTest.java
    james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/util/TestByteArrayBuffer.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/dom/Body.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/dom/Disposable.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/dom/Entity.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/dom/FieldParser.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/dom/Header.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/dom/Message.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/dom/MessageBuilder.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/dom/MessageServiceFactory.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/dom/MessageWriter.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/dom/Multipart.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/dom/ServiceLoader.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/dom/ServiceLoaderException.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/dom/SingleBody.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/dom/TextBody.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/dom/address/Address.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/dom/address/DomainList.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/dom/address/Group.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/dom/address/Mailbox.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/dom/datetime/DateTime.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/dom/field/AddressListField.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/dom/field/ContentDescriptionField.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/dom/field/ContentDispositionField.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/dom/field/ContentIdField.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/dom/field/ContentLanguageField.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/dom/field/ContentLengthField.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/dom/field/ContentLocationField.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/dom/field/ContentMD5Field.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/dom/field/ContentTransferEncodingField.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/dom/field/ContentTypeField.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/dom/field/DateTimeField.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/dom/field/MailboxField.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/dom/field/MailboxListField.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/dom/field/MimeVersionField.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/dom/field/ParseException.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/dom/field/ParsedField.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/dom/field/UnstructuredField.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/field/AbstractField.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/field/AddressListFieldImpl.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/field/ContentDescriptionFieldImpl.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/field/ContentDispositionFieldImpl.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/field/ContentDispositionFieldLenientImpl.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/field/ContentIdFieldImpl.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/field/ContentLanguageFieldImpl.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/field/ContentLanguageFieldLenientImpl.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/field/ContentLengthFieldImpl.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/field/ContentLocationFieldImpl.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/field/ContentLocationFieldLenientImpl.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/field/ContentMD5FieldImpl.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/field/ContentTransferEncodingFieldImpl.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/field/ContentTypeFieldImpl.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/field/ContentTypeFieldLenientImpl.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/field/DateTimeFieldImpl.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/field/DefaultFieldParser.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/field/DelegatingFieldParser.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/field/Fields.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/field/LenientFieldParser.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/field/MailboxFieldImpl.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/field/MailboxListFieldImpl.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/field/MailboxListFieldLenientImpl.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/field/MimeVersionFieldImpl.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/field/MimeVersionFieldLenientImpl.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/field/UnstructuredFieldImpl.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/field/address/AddressBuilder.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/field/address/AddressFormatter.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/field/address/BaseNode.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/message/AbstractEntity.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/message/AbstractHeader.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/message/AbstractMessage.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/message/AbstractMultipart.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/message/BasicBinaryBody.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/message/BasicBodyFactory.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/message/BasicTextBody.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/message/BodyFactory.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/message/BodyPart.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/message/DefaultMessageBuilder.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/message/DefaultMessageWriter.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/message/EntityBuilder.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/message/MaximalBodyDescriptor.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/message/MessageImpl.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/message/MessageServiceFactoryImpl.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/message/MultipartImpl.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/message/SimpleContentHandler.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/MultipartFormTest.java
    james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/ContentDispositionFieldTest.java
    james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/ContentLanguageFieldTest.java
    james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/ContentLocationFieldTest.java
    james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/ContentTransferEncodingFieldTest.java
    james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/ContentTypeFieldTest.java
    james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/LenientContentDispositionFieldTest.java
    james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/LenientContentLanguageFieldTest.java
    james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/LenientContentLocationFieldTest.java
    james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/LenientContentTypeFieldTest.java
    james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/LenientMimeVersionParserTest.java
    james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/MimeVersionParserTest.java
    james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/UnstructuredFieldTest.java
    james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/address/AddressTest.java
    james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/contentdisposition/ContentDispositionTest.java
    james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/datetime/DateTimeTest.java
    james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/mimeversion/MimeVersionParserTest.java
    james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/structured/StructuredFieldParserTest.java
    james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/message/MaximalBodyDescriptorTest.java
    james/mime4j/trunk/examples/src/main/java/org/apache/james/mime4j/samples/dom/LoggingMonitor.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
    james/mime4j/trunk/storage/src/main/java/org/apache/james/mime4j/storage/StorageBodyFactory.java
    james/mime4j/trunk/storage/src/main/java/org/apache/james/mime4j/storage/StorageOutputStream.java

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=1145308&r1=1145307&r2=1145308&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 Mon Jul 11 19:48:50 2011
@@ -51,7 +51,7 @@ public class MimeException extends Excep
     public MimeException(Throwable cause) {
         super(cause);
     }
-    
+
     /**
      * Constructs a MIME exception with the specified detail message and cause.
      *

Modified: james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/MimeIOException.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/MimeIOException.java?rev=1145308&r1=1145307&r2=1145308&view=diff
==============================================================================
--- james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/MimeIOException.java (original)
+++ james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/MimeIOException.java Mon Jul 11 19:48:50 2011
@@ -36,7 +36,7 @@ public class MimeIOException extends IOE
 
     /**
      * Constructs an IO exception based on {@link MimeException}.
-     * 
+     *
      * @param cause the cause.
      */
     public MimeIOException(MimeException cause) {
@@ -47,7 +47,7 @@ public class MimeIOException extends IOE
     /**
      * Returns the <code>MimeException</code> that caused this
      * <code>MimeIOException</code>.
-     * 
+     *
      * @return the cause of this <code>MimeIOException</code>.
      */
     @Override

Modified: james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/codec/Base64OutputStream.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/codec/Base64OutputStream.java?rev=1145308&r1=1145307&r2=1145308&view=diff
==============================================================================
--- james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/codec/Base64OutputStream.java (original)
+++ james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/codec/Base64OutputStream.java Mon Jul 11 19:48:50 2011
@@ -31,7 +31,7 @@ import java.util.Set;
  * Format of Internet Message Bodies</cite> by Freed and Borenstein.
  * <p>
  * Code is based on Base64 and Base64OutputStream code from Commons-Codec 1.4.
- * 
+ *
  * @see <a href="http://www.ietf.org/rfc/rfc2045.txt">RFC 2045</a>
  */
 public class Base64OutputStream extends FilterOutputStream {
@@ -90,7 +90,7 @@ public class Base64OutputStream extends 
      * Creates a <code>Base64OutputStream</code> that writes the encoded data
      * to the given output stream using the default line length (76) and line
      * separator (CRLF).
-     * 
+     *
      * @param out
      *            underlying output stream.
      */
@@ -105,7 +105,7 @@ public class Base64OutputStream extends 
      * <p>
      * The given line length will be rounded up to the nearest multiple of 4. If
      * the line length is zero then the output will not be split into lines.
-     * 
+     *
      * @param out
      *            underlying output stream.
      * @param lineLength
@@ -126,7 +126,7 @@ public class Base64OutputStream extends 
      * <p>
      * The line separator must not include characters from the BASE64 alphabet
      * (including the padding character <code>=</code>).
-     * 
+     *
      * @param out
      *            underlying output stream.
      * @param lineLength

Modified: james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/codec/CodecUtil.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/codec/CodecUtil.java?rev=1145308&r1=1145307&r2=1145308&view=diff
==============================================================================
--- james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/codec/CodecUtil.java (original)
+++ james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/codec/CodecUtil.java Mon Jul 11 19:48:50 2011
@@ -27,9 +27,9 @@ import java.io.OutputStream;
  * Utility methods related to codecs.
  */
 public class CodecUtil {
-    
+
     static final int DEFAULT_ENCODING_BUFFER_SIZE = 1024;
-    
+
     /**
      * Copies the contents of one stream to the other.
      * @param in not null
@@ -43,7 +43,7 @@ public class CodecUtil {
             out.write(buffer, 0, inputLength);
         }
     }
-    
+
     /**
      * Encodes the given stream using Quoted-Printable.
      * This assumes that stream is binary and therefore escapes
@@ -57,7 +57,7 @@ public class CodecUtil {
         copy(in, qpOut);
         qpOut.close();
     }
-    
+
     /**
      * Encodes the given stream using Quoted-Printable.
      * This assumes that stream is text and therefore does not escape
@@ -71,7 +71,7 @@ public class CodecUtil {
         copy(in, qpOut);
         qpOut.close();
     }
-    
+
     /**
      * Encodes the given stream using base64.
      *
@@ -84,21 +84,21 @@ public class CodecUtil {
         copy(in, b64Out);
         b64Out.close();
     }
-    
+
     /**
      * Wraps the given stream in a Quoted-Printable encoder.
      * @param out not null
-     * @return encoding outputstream 
+     * @return encoding outputstream
      * @throws IOException
      */
     public static OutputStream wrapQuotedPrintable(final OutputStream out, boolean binary) throws IOException {
         return new QuotedPrintableOutputStream(out, binary);
     }
-    
+
     /**
      * Wraps the given stream in a Base64 encoder.
      * @param out not null
-     * @return encoding outputstream 
+     * @return encoding outputstream
      * @throws IOException
      */
     public static OutputStream wrapBase64(final OutputStream out) throws IOException {

Modified: james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/codec/DecodeMonitor.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/codec/DecodeMonitor.java?rev=1145308&r1=1145307&r2=1145308&view=diff
==============================================================================
--- james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/codec/DecodeMonitor.java (original)
+++ james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/codec/DecodeMonitor.java Mon Jul 11 19:48:50 2011
@@ -23,11 +23,11 @@ package org.apache.james.mime4j.codec;
 /**
  * This class is used to drive how decoder/parser should deal with malformed
  * and unexpected data.
- * 
+ *
  * 2 basic implementations are provided:
  * STRICT return "true" on any occurrence.
  * SILENT ignores any problem.
- * 
+ *
  * @see org.apache.james.mime4j.field.LoggingMonitor for an example
  * about logging malformations via Commons-logging.
  */
@@ -48,12 +48,12 @@ public class DecodeMonitor {
             return true;
         }
     };
-    
+
     /**
      * The SILENT monitor ignore requests.
      */
     public static final DecodeMonitor SILENT = new DecodeMonitor();
-    
+
     public boolean warn(String error, String dropDesc) {
         return false;
     }

Modified: james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/codec/DecoderUtil.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/codec/DecoderUtil.java?rev=1145308&r1=1145307&r2=1145308&view=diff
==============================================================================
--- james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/codec/DecoderUtil.java (original)
+++ james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/codec/DecoderUtil.java Mon Jul 11 19:48:50 2011
@@ -38,20 +38,20 @@ public class DecoderUtil {
             "(.*?)=\\?([^\\?]+?)\\?(\\w)\\?([^\\?]+?)\\?=", Pattern.DOTALL);
 
     /**
-     * Decodes a string containing quoted-printable encoded data. 
-     * 
+     * Decodes a string containing quoted-printable encoded data.
+     *
      * @param s the string to decode.
      * @return the decoded bytes.
      */
     private static byte[] decodeQuotedPrintable(String s, DecodeMonitor monitor) {
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        
+
         try {
             byte[] bytes = s.getBytes("US-ASCII");
-            
+
             QuotedPrintableInputStream is = new QuotedPrintableInputStream(
                                                new ByteArrayInputStream(bytes), monitor);
-            
+
             int b = 0;
             while ((b = is.read()) != -1) {
                 baos.write(b);
@@ -60,26 +60,26 @@ public class DecoderUtil {
             // This should never happen!
             throw new IllegalStateException(e);
         }
-        
+
         return baos.toByteArray();
     }
-    
+
     /**
-     * Decodes a string containing base64 encoded data. 
-     * 
+     * Decodes a string containing base64 encoded data.
+     *
      * @param s the string to decode.
-     * @param monitor 
+     * @param monitor
      * @return the decoded bytes.
      */
     private static byte[] decodeBase64(String s, DecodeMonitor monitor) {
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        
+
         try {
             byte[] bytes = s.getBytes("US-ASCII");
-            
+
             Base64InputStream is = new Base64InputStream(
                                         new ByteArrayInputStream(bytes), monitor);
-            
+
             int b = 0;
             while ((b = is.read()) != -1) {
                 baos.write(b);
@@ -88,41 +88,41 @@ public class DecoderUtil {
             // This should never happen!
             throw new IllegalStateException(e);
         }
-        
+
         return baos.toByteArray();
     }
-    
+
     /**
-     * Decodes an encoded text encoded with the 'B' encoding (described in 
+     * Decodes an encoded text encoded with the 'B' encoding (described in
      * RFC 2047) found in a header field body.
-     * 
+     *
      * @param encodedText the encoded text to decode.
      * @param charset the Java charset to use.
-     * @param monitor 
+     * @param monitor
      * @return the decoded string.
-     * @throws UnsupportedEncodingException if the given Java charset isn't 
+     * @throws UnsupportedEncodingException if the given Java charset isn't
      *         supported.
      */
-    static String decodeB(String encodedText, String charset, DecodeMonitor monitor) 
+    static String decodeB(String encodedText, String charset, DecodeMonitor monitor)
             throws UnsupportedEncodingException {
         byte[] decodedBytes = decodeBase64(encodedText, monitor);
         return new String(decodedBytes, charset);
     }
-    
+
     /**
-     * Decodes an encoded text encoded with the 'Q' encoding (described in 
+     * Decodes an encoded text encoded with the 'Q' encoding (described in
      * RFC 2047) found in a header field body.
-     * 
+     *
      * @param encodedText the encoded text to decode.
      * @param charset the Java charset to use.
      * @return the decoded string.
-     * @throws UnsupportedEncodingException if the given Java charset isn't 
+     * @throws UnsupportedEncodingException if the given Java charset isn't
      *         supported.
      */
     static String decodeQ(String encodedText, String charset, DecodeMonitor monitor)
             throws UnsupportedEncodingException {
         encodedText = replaceUnderscores(encodedText);
-        
+
         byte[] decodedBytes = decodeQuotedPrintable(encodedText, monitor);
         return new String(decodedBytes, charset);
     }
@@ -135,7 +135,7 @@ public class DecoderUtil {
      * Decodes a string containing encoded words as defined by RFC 2047. Encoded
      * words have the form =?charset?enc?encoded-text?= where enc is either 'Q'
      * or 'q' for quoted-printable and 'B' or 'b' for base64.
-     * 
+     *
      * @param body the string to decode
      * @param monitor the DecodeMonitor to be used.
      * @return the decoded string.
@@ -181,13 +181,13 @@ public class DecoderUtil {
             final String encoding, final String encodedText, final DecodeMonitor monitor) {
         Charset charset = CharsetUtil.lookup(mimeCharset);
         if (charset == null) {
-            monitor(monitor, mimeCharset, encoding, encodedText, "leaving word encoded", 
+            monitor(monitor, mimeCharset, encoding, encodedText, "leaving word encoded",
                     "Mime charser '", mimeCharset, "' doesn't have a corresponding Java charset");
             return null;
         }
 
         if (encodedText.length() == 0) {
-            monitor(monitor, mimeCharset, encoding, encodedText, "leaving word encoded", 
+            monitor(monitor, mimeCharset, encoding, encodedText, "leaving word encoded",
                     "Missing encoded text in encoded word");
             return null;
         }
@@ -198,17 +198,17 @@ public class DecoderUtil {
             } else if (encoding.equalsIgnoreCase("B")) {
                 return DecoderUtil.decodeB(encodedText, charset.name(), monitor);
             } else {
-                monitor(monitor, mimeCharset, encoding, encodedText, "leaving word encoded", 
+                monitor(monitor, mimeCharset, encoding, encodedText, "leaving word encoded",
                         "Warning: Unknown encoding in encoded word");
                 return null;
             }
         } catch (UnsupportedEncodingException e) {
             // should not happen because of isDecodingSupported check above
-            monitor(monitor, mimeCharset, encoding, encodedText, "leaving word encoded", 
+            monitor(monitor, mimeCharset, encoding, encodedText, "leaving word encoded",
                     "Unsupported encoding (", e.getMessage(), ") in encoded word");
             return null;
         } catch (RuntimeException e) {
-            monitor(monitor, mimeCharset, encoding, encodedText, "leaving word encoded", 
+            monitor(monitor, mimeCharset, encoding, encodedText, "leaving word encoded",
                     "Could not decode (", e.getMessage(), ") encoded word");
             return null;
         }
@@ -226,7 +226,7 @@ public class DecoderUtil {
             text.append(encodedWord);
             text.append(")");
             String exceptionDesc = text.toString();
-            if (monitor.warn(exceptionDesc, dropDesc)) 
+            if (monitor.warn(exceptionDesc, dropDesc))
                 throw new IllegalArgumentException(text.toString());
         }
     }
@@ -250,7 +250,7 @@ public class DecoderUtil {
                 sb.append(c);
             }
         }
-        
+
         return sb.toString();
     }
 }

Modified: james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/codec/EncoderUtil.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/codec/EncoderUtil.java?rev=1145308&r1=1145307&r2=1145308&view=diff
==============================================================================
--- james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/codec/EncoderUtil.java (original)
+++ james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/codec/EncoderUtil.java Mon Jul 11 19:48:50 2011
@@ -95,7 +95,7 @@ public class EncoderUtil {
      * href='http://www.faqs.org/rfcs/rfc5322.html'>RFC 5322</a> section 3.4
      * and <a href='http://www.faqs.org/rfcs/rfc2047.html'>RFC 2047</a> section
      * 5.3. The specified string should not be folded.
-     * 
+     *
      * @param displayName
      *            display-name to encode.
      * @return encoded display-name.
@@ -121,7 +121,7 @@ public class EncoderUtil {
      * 5322 section 3.4.1. Leading and trailing CFWS should have been removed
      * before calling this method. The specified string should not contain any
      * illegal (control or non-ASCII) characters.
-     * 
+     *
      * @param localPart
      *            the local part to encode
      * @return the encoded local part.
@@ -142,7 +142,7 @@ public class EncoderUtil {
      * Encodes the specified strings into a header parameter as described in RFC
      * 2045 section 5.1 and RFC 2183 section 2. The specified strings should not
      * contain any illegal (control or non-ASCII) characters.
-     * 
+     *
      * @param name
      *            parameter name.
      * @param value
@@ -163,7 +163,7 @@ public class EncoderUtil {
     /**
      * Shortcut method that encodes the specified text into an encoded-word if
      * the text has to be encoded.
-     * 
+     *
      * @param text
      *            text to encode.
      * @param usage
@@ -188,7 +188,7 @@ public class EncoderUtil {
      * fall into the printable ASCII character set or if the text contains a
      * 'word' (sequence of non-whitespace characters) longer than 77 characters
      * (including characters already used up in the line).
-     * 
+     *
      * @param text
      *            text to analyze.
      * @param usedCharacters
@@ -238,7 +238,7 @@ public class EncoderUtil {
      * <p>
      * This method assumes that zero characters have already been used up in the
      * current line.
-     * 
+     *
      * @param text
      *            text to encode.
      * @param usage
@@ -259,7 +259,7 @@ public class EncoderUtil {
      * <p>
      * The charset to encode the specified text into a byte array and the
      * encoding to use for the encoded-word are detected automatically.
-     * 
+     *
      * @param text
      *            text to encode.
      * @param usage
@@ -280,7 +280,7 @@ public class EncoderUtil {
      * Encodes the specified text into an encoded word or a sequence of encoded
      * words separated by space. The text is separated into a sequence of
      * encoded words if it does not fit in a single one.
-     * 
+     *
      * @param text
      *            text to encode.
      * @param usage
@@ -327,7 +327,7 @@ public class EncoderUtil {
     /**
      * Encodes the specified byte array using the B encoding defined in RFC
      * 2047.
-     * 
+     *
      * @param bytes
      *            byte array to encode.
      * @return encoded string.
@@ -367,7 +367,7 @@ public class EncoderUtil {
     /**
      * Encodes the specified byte array using the Q encoding defined in RFC
      * 2047.
-     * 
+     *
      * @param bytes
      *            byte array to encode.
      * @param usage
@@ -401,7 +401,7 @@ public class EncoderUtil {
     /**
      * Tests whether the specified string is a token as defined in RFC 2045
      * section 5.1.
-     * 
+     *
      * @param str
      *            string to test.
      * @return <code>true</code> if the specified string is a RFC 2045 token,

Modified: james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/codec/QuotedPrintableInputStream.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/codec/QuotedPrintableInputStream.java?rev=1145308&r1=1145307&r2=1145308&view=diff
==============================================================================
--- james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/codec/QuotedPrintableInputStream.java (original)
+++ james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/codec/QuotedPrintableInputStream.java Mon Jul 11 19:48:50 2011
@@ -28,23 +28,23 @@ import org.apache.james.mime4j.util.Byte
  * Performs Quoted-Printable decoding on an underlying stream.
  */
 public class QuotedPrintableInputStream extends InputStream {
-    
+
     private static final int DEFAULT_BUFFER_SIZE = 1024 * 2;
-    
+
     private static final byte EQ = 0x3D;
     private static final byte CR = 0x0D;
     private static final byte LF = 0x0A;
-    
+
     private final byte[] singleByte = new byte[1];
-    
+
     private final InputStream in;
-    private final ByteArrayBuffer decodedBuf; 
-    private final ByteArrayBuffer blanks; 
-    
+    private final ByteArrayBuffer decodedBuf;
+    private final ByteArrayBuffer blanks;
+
     private final byte[] encoded;
     private int pos = 0; // current index into encoded buffer
     private int limit = 0; // current size of encoded buffer
-    
+
     private boolean closed;
 
     private final DecodeMonitor monitor;
@@ -70,15 +70,15 @@ public class QuotedPrintableInputStream 
     public QuotedPrintableInputStream(final InputStream in, boolean strict) {
         this(DEFAULT_BUFFER_SIZE, in, strict);
     }
-    
+
     public QuotedPrintableInputStream(final InputStream in) {
         this(in, false);
     }
-    
+
     /**
-     * Terminates Quoted-Printable coded content. This method does NOT close 
+     * Terminates Quoted-Printable coded content. This method does NOT close
      * the underlying input stream.
-     * 
+     *
      * @throws IOException on I/O errors.
      */
     @Override
@@ -96,7 +96,7 @@ public class QuotedPrintableInputStream 
             limit = 0;
             pos = 0;
         }
-        
+
         int capacity = encoded.length - limit;
         if (capacity > 0) {
             int bytesRead = in.read(encoded, limit, capacity);
@@ -108,7 +108,7 @@ public class QuotedPrintableInputStream 
             return 0;
         }
     }
-    
+
     private int getnext() {
         if (pos < limit) {
             byte b =  encoded[pos];
@@ -118,7 +118,7 @@ public class QuotedPrintableInputStream 
             return -1;
         }
     }
-    
+
     private int peek(int i) {
         if (pos + i < limit) {
             return encoded[pos + i] & 0xFF;
@@ -126,7 +126,7 @@ public class QuotedPrintableInputStream 
             return -1;
         }
     }
-    
+
     private int transfer(
             final int b, final byte[] buffer, final int from, final int to, boolean keepblanks) throws IOException {
         int index = from;
@@ -154,7 +154,7 @@ public class QuotedPrintableInputStream 
         }
         return index;
     }
-    
+
     private int read0(final byte[] buffer, final int off, final int len) throws IOException {
         boolean eof = false;
         int from = off;
@@ -168,14 +168,14 @@ public class QuotedPrintableInputStream 
             decodedBuf.remove(0, chunk);
             index += chunk;
         }
-        
+
         while (index < to) {
 
             if (limit - pos < 3) {
                 int bytesRead = fillBuffer();
                 eof = bytesRead == -1;
             }
-            
+
             // end of stream?
             if (limit - pos == 0 && eof) {
                 return index == from ? -1 : index - from;
@@ -193,14 +193,14 @@ public class QuotedPrintableInputStream 
                     if (monitor.warn("Found LF without CR", "Translating to CRLF"))
                         throw new IOException("Found LF without CR");
                 }
-                
+
                 if (b == CR) {
                     lastWasCR = true;
                     continue;
                 } else {
                     lastWasCR = false;
                 }
-                
+
                 if (b == LF) {
                     // at end of line
                     if (blanks.length() == 0) {

Modified: james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/codec/QuotedPrintableOutputStream.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/codec/QuotedPrintableOutputStream.java?rev=1145308&r1=1145307&r2=1145308&view=diff
==============================================================================
--- james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/codec/QuotedPrintableOutputStream.java (original)
+++ james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/codec/QuotedPrintableOutputStream.java Mon Jul 11 19:48:50 2011
@@ -25,16 +25,16 @@ import java.io.OutputStream;
 
 /**
  * Performs Quoted-Printable encoding on an underlying stream.
- * 
+ *
  * Encodes every "required" char plus the dot ".". We encode the dot
  * by default because this is a workaround for some "filter"/"antivirus"
  * "old mua" having issues with dots at the beginning or the end of a
  * qp encode line (maybe a bad dot-destuffing algo).
  */
 public class QuotedPrintableOutputStream extends FilterOutputStream {
-    
+
     private static final int DEFAULT_BUFFER_SIZE = 1024 * 3;
-    
+
     private static final byte TB = 0x09;
     private static final byte SP = 0x20;
     private static final byte EQ = 0x3D;
@@ -49,7 +49,7 @@ public class QuotedPrintableOutputStream
 
     private final byte[] outBuffer;
     private final boolean binary;
-    
+
     private boolean pendingSpace;
     private boolean pendingTab;
     private boolean pendingCR;
@@ -59,7 +59,7 @@ public class QuotedPrintableOutputStream
     private boolean closed = false;
 
     private byte[] singleByte = new byte[1];
-    
+
     public QuotedPrintableOutputStream(int bufsize, OutputStream out, boolean binary) {
         super(out);
         this.outBuffer = new byte[bufsize];
@@ -74,18 +74,18 @@ public class QuotedPrintableOutputStream
     public QuotedPrintableOutputStream(OutputStream out, boolean binary) {
         this(DEFAULT_BUFFER_SIZE, out, binary);
     }
-    
+
     private void encodeChunk(byte[] buffer, int off, int len) throws IOException {
         for (int inputIndex = off; inputIndex < len + off; inputIndex++) {
             encode(buffer[inputIndex]);
         }
     }
-    
+
     private void completeEncoding() throws IOException {
         writePending();
         flushOutput();
     }
-    
+
     private void writePending() throws IOException {
         if (pendingSpace) {
             plain(SP);
@@ -96,13 +96,13 @@ public class QuotedPrintableOutputStream
         }
         clearPending();
     }
-    
+
     private void clearPending() throws IOException {
         pendingSpace  = false;
         pendingTab = false;
         pendingCR = false;
     }
-    
+
     private void encode(byte next) throws IOException {
         if (next == LF) {
             if (binary) {
@@ -110,7 +110,7 @@ public class QuotedPrintableOutputStream
                 escape(next);
             } else {
                 if (pendingCR) {
-                    // Expect either space or tab pending 
+                    // Expect either space or tab pending
                     // but not both
                     if (pendingSpace) {
                         escape(SP);
@@ -155,35 +155,35 @@ public class QuotedPrintableOutputStream
             }
         }
     }
-    
+
     private void plain(byte next) throws IOException {
         if (--nextSoftBreak <= 1) {
             softBreak();
         }
         write(next);
     }
-    
+
     private void escape(byte next) throws IOException {
         if (--nextSoftBreak <= QUOTED_PRINTABLE_OCTETS_PER_ESCAPE) {
             softBreak();
         }
-        
+
         int nextUnsigned = next & 0xff;
-        
+
         write(EQ);
         --nextSoftBreak;
         write(HEX_DIGITS[nextUnsigned >> 4]);
         --nextSoftBreak;
         write(HEX_DIGITS[nextUnsigned % 0x10]);
     }
-    
+
     private void write(byte next) throws IOException {
         outBuffer[outputIndex++] = next;
         if (outputIndex >= outBuffer.length) {
             flushOutput();
         }
     }
-    
+
     private void softBreak() throws IOException {
         write(EQ);
         lineBreak();
@@ -194,7 +194,7 @@ public class QuotedPrintableOutputStream
         write(LF);
         nextSoftBreak = QUOTED_PRINTABLE_MAX_LINE_LENGTH;
     }
-    
+
     void flushOutput() throws IOException {
         if (outputIndex < outBuffer.length) {
             out.write(outBuffer, 0, outputIndex);
@@ -203,7 +203,7 @@ public class QuotedPrintableOutputStream
         }
         outputIndex = 0;
     }
-    
+
     @Override
     public void close() throws IOException {
         if (closed)
@@ -236,4 +236,4 @@ public class QuotedPrintableOutputStream
         encodeChunk(b, off, len);
     }
 
-}
\ No newline at end of file
+}

Modified: james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/io/BufferedLineReaderInputStream.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/io/BufferedLineReaderInputStream.java?rev=1145308&r1=1145307&r2=1145308&view=diff
==============================================================================
--- james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/io/BufferedLineReaderInputStream.java (original)
+++ james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/io/BufferedLineReaderInputStream.java Mon Jul 11 19:48:50 2011
@@ -25,27 +25,27 @@ import java.io.IOException;
 import java.io.InputStream;
 
 /**
- * Input buffer that can be used to search for patterns using Quick Search 
- * algorithm in data read from an {@link InputStream}. 
+ * Input buffer that can be used to search for patterns using Quick Search
+ * algorithm in data read from an {@link InputStream}.
  */
 public class BufferedLineReaderInputStream extends LineReaderInputStream {
 
     private boolean truncated;
-    
+
     boolean tempBuffer = false;
-    
+
     private byte[] origBuffer;
     private int origBufpos;
     private int origBuflen;
-    
+
     private byte[] buffer;
     private int bufpos;
     private int buflen;
-    
+
     private final int maxLineLen;
-    
+
     public BufferedLineReaderInputStream(
-            final InputStream instream, 
+            final InputStream instream,
             int buffersize,
             int maxLineLen) {
         super(instream);
@@ -63,7 +63,7 @@ public class BufferedLineReaderInputStre
     }
 
     public BufferedLineReaderInputStream(
-            final InputStream instream, 
+            final InputStream instream,
             int buffersize) {
         this(instream, buffersize, -1);
     }
@@ -76,26 +76,26 @@ public class BufferedLineReaderInputStre
         }
         this.buffer = newbuffer;
     }
-    
+
     public void ensureCapacity(int len) {
         if (len > this.buffer.length) {
             expand(len);
         }
     }
-    
+
     public int fillBuffer() throws IOException {
-    	if (tempBuffer) {
-    		// we was on tempBuffer.
-    		// check that we completed the tempBuffer
-    		if (bufpos != buflen) throw new IllegalStateException("unread only works when a buffer is fully read before the next refill is asked!");
-    		// restore the original buffer
-    		buffer = origBuffer;
-    		buflen = origBuflen;
-    		bufpos = origBufpos;
-    		tempBuffer = false;
-    		// return that we just read bufferLen data.
-    		return bufferLen();
-    	}
+        if (tempBuffer) {
+            // we was on tempBuffer.
+            // check that we completed the tempBuffer
+            if (bufpos != buflen) throw new IllegalStateException("unread only works when a buffer is fully read before the next refill is asked!");
+            // restore the original buffer
+            buffer = origBuffer;
+            buflen = origBuflen;
+            bufpos = origBufpos;
+            tempBuffer = false;
+            // return that we just read bufferLen data.
+            return bufferLen();
+        }
         // compact the buffer if necessary
         if (this.bufpos > 0) { // could swtich to (this.buffer.length / 2) but needs a 4*boundary capacity, then (instead of 2).
             int len = bufferLen();
@@ -117,9 +117,9 @@ public class BufferedLineReaderInputStre
         }
     }
 
-	private int bufferLen() {
-		return this.buflen - this.bufpos;
-	}
+    private int bufferLen() {
+        return this.buflen - this.bufpos;
+    }
 
     public boolean hasBufferedData() {
         return bufferLen() > 0;
@@ -129,11 +129,11 @@ public class BufferedLineReaderInputStre
         clear();
         this.truncated = true;
     }
-    
+
     protected boolean readAllowed() {
-    	return !this.truncated;
+        return !this.truncated;
     }
-    
+
     @Override
     public int read() throws IOException {
         if (!readAllowed()) return -1;
@@ -146,7 +146,7 @@ public class BufferedLineReaderInputStre
         }
         return this.buffer[this.bufpos++] & 0xff;
     }
-    
+
     @Override
     public int read(final byte[] b, int off, int len) throws IOException {
         if (!readAllowed()) return -1;
@@ -168,7 +168,7 @@ public class BufferedLineReaderInputStre
         this.bufpos += chunk;
         return chunk;
     }
-    
+
     @Override
     public int read(final byte[] b) throws IOException {
         if (!readAllowed()) return -1;
@@ -177,7 +177,7 @@ public class BufferedLineReaderInputStre
         }
         return read(b, 0, b.length);
     }
-    
+
     @Override
     public boolean markSupported() {
         return false;
@@ -225,11 +225,11 @@ public class BufferedLineReaderInputStre
         }
     }
 
-	/**
+    /**
      * Implements quick search algorithm as published by
-     * <p> 
-     * SUNDAY D.M., 1990, 
-     * A very fast substring search algorithm, 
+     * <p>
+     * SUNDAY D.M., 1990,
+     * A very fast substring search algorithm,
      * Communications of the ACM . 33(8):132-142.
      * </p>
      */
@@ -243,7 +243,7 @@ public class BufferedLineReaderInputStre
         if (len < pattern.length) {
             return -1;
         }
-        
+
         int[] shiftTable = new int[256];
         for (int i = 0; i < shiftTable.length; i++) {
             shiftTable[i] = pattern.length + 1;
@@ -252,7 +252,7 @@ public class BufferedLineReaderInputStre
             int x = pattern[i] & 0xff;
             shiftTable[x] = pattern.length - i;
         }
-        
+
         int j = 0;
         while (j <= len - pattern.length) {
             int cur = off + j;
@@ -266,8 +266,8 @@ public class BufferedLineReaderInputStre
             if (match) {
                 return cur;
             }
-            
-            int pos = cur + pattern.length; 
+
+            int pos = cur + pattern.length;
             if (pos >= this.buffer.length) {
                 break;
             }
@@ -276,12 +276,12 @@ public class BufferedLineReaderInputStre
         }
         return -1;
     }
-    
+
     /**
      * Implements quick search algorithm as published by
-     * <p> 
-     * SUNDAY D.M., 1990, 
-     * A very fast substring search algorithm, 
+     * <p>
+     * SUNDAY D.M., 1990,
+     * A very fast substring search algorithm,
      * Communications of the ACM . 33(8):132-142.
      * </p>
      */
@@ -300,41 +300,41 @@ public class BufferedLineReaderInputStre
         }
         return -1;
     }
-    
+
     public int indexOf(byte b) {
         return indexOf(b, this.bufpos, bufferLen());
     }
-    
+
     public int byteAt(int pos) {
         if (pos < this.bufpos || pos > this.buflen) {
             throw new IndexOutOfBoundsException("looking for "+pos+" in "+bufpos+"/"+buflen);
         }
         return this.buffer[pos] & 0xff;
     }
-    
+
     protected byte[] buf() {
-        return this.buffer;        
+        return this.buffer;
     }
-    
+
     protected int pos() {
         return this.bufpos;
     }
-    
+
     protected int limit() {
         return this.buflen;
     }
-    
+
     protected int length() {
         return bufferLen();
     }
-    
+
     public int capacity() {
         return this.buffer.length;
     }
-    
+
     protected int skip(int n) {
         int chunk = Math.min(n, bufferLen());
-        this.bufpos += chunk; 
+        this.bufpos += chunk;
         return chunk;
     }
 
@@ -342,7 +342,7 @@ public class BufferedLineReaderInputStre
         this.bufpos = 0;
         this.buflen = 0;
     }
-    
+
     @Override
     public String toString() {
         StringBuilder buffer = new StringBuilder();
@@ -373,17 +373,17 @@ public class BufferedLineReaderInputStre
         return buffer.toString();
     }
 
-	@Override
-	public boolean unread(ByteArrayBuffer buf) {
-	    if (tempBuffer) return false;
-		origBuffer = buffer;
-		origBuflen = buflen;
-		origBufpos = bufpos;
-		bufpos = 0;
-		buflen = buf.length();
-		buffer = buf.buffer();
-		tempBuffer = true;
-		return true;
-	}
+    @Override
+    public boolean unread(ByteArrayBuffer buf) {
+        if (tempBuffer) return false;
+        origBuffer = buffer;
+        origBuflen = buflen;
+        origBufpos = bufpos;
+        bufpos = 0;
+        buflen = buf.length();
+        buffer = buf.buffer();
+        tempBuffer = true;
+        return true;
+    }
 
 }

Modified: james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/io/EOLConvertingInputStream.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/io/EOLConvertingInputStream.java?rev=1145308&r1=1145307&r2=1145308&view=diff
==============================================================================
--- james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/io/EOLConvertingInputStream.java (original)
+++ james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/io/EOLConvertingInputStream.java Mon Jul 11 19:48:50 2011
@@ -25,7 +25,7 @@ import java.io.PushbackInputStream;
 
 /**
  * InputStream which converts <code>\r</code>
- * bytes not followed by <code>\n</code> and <code>\n</code> not 
+ * bytes not followed by <code>\n</code> and <code>\n</code> not
  * preceded by <code>\r</code> to <code>\r\n</code>.
  */
 public class EOLConvertingInputStream extends InputStream {
@@ -35,16 +35,16 @@ public class EOLConvertingInputStream ex
     public static final int CONVERT_LF   = 2;
     /** Converts single '\r' and '\n' to '\r\n' */
     public static final int CONVERT_BOTH = 3;
-    
+
     private PushbackInputStream in = null;
     private int previous = 0;
     private int flags = CONVERT_BOTH;
-    
+
     /**
      * Creates a new <code>EOLConvertingInputStream</code>
      * instance converting bytes in the given <code>InputStream</code>.
      * The flag <code>CONVERT_BOTH</code> is the default.
-     * 
+     *
      * @param in the <code>InputStream</code> to read from.
      */
     public EOLConvertingInputStream(InputStream in) {
@@ -53,39 +53,39 @@ public class EOLConvertingInputStream ex
     /**
      * Creates a new <code>EOLConvertingInputStream</code>
      * instance converting bytes in the given <code>InputStream</code>.
-     * 
+     *
      * @param in the <code>InputStream</code> to read from.
      * @param flags one of <code>CONVERT_CR</code>, <code>CONVERT_LF</code> or
      *        <code>CONVERT_BOTH</code>.
      */
     public EOLConvertingInputStream(InputStream in, int flags) {
         super();
-        
+
         this.in = new PushbackInputStream(in, 2);
         this.flags = flags;
     }
 
     /**
      * Closes the underlying stream.
-     * 
+     *
      * @throws IOException on I/O errors.
      */
     @Override
     public void close() throws IOException {
         in.close();
     }
-    
+
     /**
      * @see java.io.InputStream#read()
      */
     @Override
     public int read() throws IOException {
         int b = in.read();
-        
+
         if (b == -1) {
             return -1;
         }
-        
+
         if ((flags & CONVERT_CR) != 0 && b == '\r') {
             int c = in.read();
             if (c != -1) {
@@ -98,9 +98,9 @@ public class EOLConvertingInputStream ex
             b = '\r';
             in.unread('\n');
         }
-        
+
         previous = b;
-        
+
         return b;
     }
 

Modified: james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/io/LimitedInputStream.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/io/LimitedInputStream.java?rev=1145308&r1=1145307&r2=1145308&view=diff
==============================================================================
--- james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/io/LimitedInputStream.java (original)
+++ james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/io/LimitedInputStream.java Mon Jul 11 19:48:50 2011
@@ -39,7 +39,7 @@ public class LimitedInputStream extends 
             throw new IOException("Input stream limit exceeded");
         }
     }
-    
+
     @Override
     public int read() throws IOException {
         enforceLimit();
@@ -63,5 +63,5 @@ public class LimitedInputStream extends 
     private int getBytesLeft() {
         return (int)Math.min(Integer.MAX_VALUE, limit - position);
     }
-    
+
 }

Modified: james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/io/LineNumberInputStream.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/io/LineNumberInputStream.java?rev=1145308&r1=1145307&r2=1145308&view=diff
==============================================================================
--- james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/io/LineNumberInputStream.java (original)
+++ james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/io/LineNumberInputStream.java Mon Jul 11 19:48:50 2011
@@ -33,7 +33,7 @@ public class LineNumberInputStream exten
 
     /**
      * Creates a new <code>LineNumberInputStream</code>.
-     * 
+     *
      * @param is
      *            the stream to read from.
      */

Modified: james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/io/LineNumberSource.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/io/LineNumberSource.java?rev=1145308&r1=1145307&r2=1145308&view=diff
==============================================================================
--- james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/io/LineNumberSource.java (original)
+++ james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/io/LineNumberSource.java Mon Jul 11 19:48:50 2011
@@ -23,7 +23,7 @@ public interface LineNumberSource {
     /**
      * Gets the current line number starting at 1 (the number of
      * <code>\r\n</code> read so far plus 1).
-     * 
+     *
      * @return the current line number.
      */
     int getLineNumber();

Modified: james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/io/LineReaderInputStream.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/io/LineReaderInputStream.java?rev=1145308&r1=1145307&r2=1145308&view=diff
==============================================================================
--- james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/io/LineReaderInputStream.java (original)
+++ james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/io/LineReaderInputStream.java Mon Jul 11 19:48:50 2011
@@ -26,7 +26,7 @@ import java.io.IOException;
 import java.io.InputStream;
 
 /**
- * Input stream capable of reading lines of text. 
+ * Input stream capable of reading lines of text.
  */
 public abstract class LineReaderInputStream extends FilterInputStream {
 
@@ -36,27 +36,27 @@ public abstract class LineReaderInputStr
 
     /**
      * Reads one line of text into the given {@link ByteArrayBuffer}.
-     *  
+     *
      * @param dst Destination
-     * @return number of bytes copied or <code>-1</code> if the end of 
+     * @return number of bytes copied or <code>-1</code> if the end of
      * the stream has been reached.
-     * 
+     *
      * @throws MaxLineLimitException if the line exceeds a limit on
      *   the line length imposed by a subclass.
      * @throws IOException in case of an I/O error.
      */
     public abstract int readLine(final ByteArrayBuffer dst)
             throws MaxLineLimitException, IOException;
-    
+
     /**
      * Tries to unread the last read line.
-     * 
+     *
      * Implementation may refuse to unread a new buffer until the previous
      * unread one has been competely consumed.
-     * 
+     *
      * Implementations will directly use the byte array backed by buf, so
      * make sure to not alter it anymore once this method has been called.
-     * 
+     *
      * @return true if the unread has been succesfull.
      */
     public abstract boolean unread(ByteArrayBuffer buf);

Modified: james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/io/LineReaderInputStreamAdaptor.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/io/LineReaderInputStreamAdaptor.java?rev=1145308&r1=1145307&r2=1145308&view=diff
==============================================================================
--- james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/io/LineReaderInputStreamAdaptor.java (original)
+++ james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/io/LineReaderInputStreamAdaptor.java Mon Jul 11 19:48:50 2011
@@ -26,14 +26,14 @@ import java.io.InputStream;
 
 /**
  * <code>InputStream</code> used by the MIME parser to detect whether the
- * underlying data stream was used (read from) and whether the end of the 
+ * underlying data stream was used (read from) and whether the end of the
  * stream was reached.
  */
 public class LineReaderInputStreamAdaptor extends LineReaderInputStream {
 
     private final LineReaderInputStream bis;
     private final int maxLineLen;
-    
+
     private boolean used = false;
     private boolean eof = false;
 
@@ -53,7 +53,7 @@ public class LineReaderInputStreamAdapto
             final InputStream is) {
         this(is, -1);
     }
-    
+
     @Override
     public int read() throws IOException {
         int i = in.read();
@@ -69,7 +69,7 @@ public class LineReaderInputStreamAdapto
         this.used = true;
         return i;
     }
-    
+
     @Override
     public int readLine(final ByteArrayBuffer dst)
             throws MaxLineLimitException, IOException {
@@ -104,7 +104,7 @@ public class LineReaderInputStreamAdapto
             return total;
         }
     }
-    
+
     public boolean eof() {
         return this.eof;
     }
@@ -112,37 +112,37 @@ public class LineReaderInputStreamAdapto
     public boolean isUsed() {
         return this.used;
     }
-    
+
     @Override
     public String toString() {
         return "[LineReaderInputStreamAdaptor: " + bis + "]";
     }
 
-	@Override
-	public boolean unread(ByteArrayBuffer buf) {
-		if (bis != null) {
-			return bis.unread(buf);
-		} else {
-			return false;
-		}
-	}
-
-	@Override
-	public long skip(long count) throws IOException {
-		if (count <= 0) {
-			return 0; // So specified by InputStream.skip(long).
-		}
-		final int bufferSize = count > 8192 ? 8192 : (int) count;
-		final byte[] buffer = new byte[bufferSize];
-		long result = 0;
-		while (count > 0) {
-			int res = read(buffer);
-			if (res == -1) {
-				break;
-			}
-			result += res;
-			count -= res;
-		}
-		return result;
-	}
+    @Override
+    public boolean unread(ByteArrayBuffer buf) {
+        if (bis != null) {
+            return bis.unread(buf);
+        } else {
+            return false;
+        }
+    }
+
+    @Override
+    public long skip(long count) throws IOException {
+        if (count <= 0) {
+            return 0; // So specified by InputStream.skip(long).
+        }
+        final int bufferSize = count > 8192 ? 8192 : (int) count;
+        final byte[] buffer = new byte[bufferSize];
+        long result = 0;
+        while (count > 0) {
+            int res = read(buffer);
+            if (res == -1) {
+                break;
+            }
+            result += res;
+            count -= res;
+        }
+        return result;
+    }
 }

Modified: james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/io/MaxHeaderLimitException.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/io/MaxHeaderLimitException.java?rev=1145308&r1=1145307&r2=1145308&view=diff
==============================================================================
--- james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/io/MaxHeaderLimitException.java (original)
+++ james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/io/MaxHeaderLimitException.java Mon Jul 11 19:48:50 2011
@@ -25,7 +25,7 @@ import org.apache.james.mime4j.MimeExcep
  * Signals a I/O error due to the header count exceeding the maximum limit.
  */
 public class MaxHeaderLimitException extends MimeException {
-    
+
     private static final long serialVersionUID = 2154269045186186769L;
 
     public MaxHeaderLimitException(final String message) {

Modified: james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/io/MimeBoundaryInputStream.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/io/MimeBoundaryInputStream.java?rev=1145308&r1=1145307&r2=1145308&view=diff
==============================================================================
--- james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/io/MimeBoundaryInputStream.java (original)
+++ james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/io/MimeBoundaryInputStream.java Mon Jul 11 19:48:50 2011
@@ -35,7 +35,7 @@ public class MimeBoundaryInputStream ext
 
     private final byte[] boundary;
     private final boolean strict;
-    
+
     private boolean eof;
     private int limit;
     private boolean atBoundary;
@@ -47,21 +47,21 @@ public class MimeBoundaryInputStream ext
 
     /**
      * Store the first buffer length.
-     * Used to distinguish between an empty preamble and 
-     * no preamble. 
+     * Used to distinguish between an empty preamble and
+     * no preamble.
      */
     private int initialLength;
 
     /**
      * Creates a new MimeBoundaryInputStream.
-     * 
+     *
      * @param inbuffer The underlying stream.
      * @param boundary Boundary string (not including leading hyphens).
      * @throws IllegalArgumentException when boundary is too long
      */
     public MimeBoundaryInputStream(
-            final BufferedLineReaderInputStream inbuffer, 
-            final String boundary, 
+            final BufferedLineReaderInputStream inbuffer,
+            final String boundary,
             final boolean strict) throws IOException {
         super(inbuffer);
         int bufferSize = 2 * boundary.length();
@@ -77,7 +77,7 @@ public class MimeBoundaryInputStream ext
         this.lastPart = false;
         this.initialLength = -1;
         this.completed = false;
-        
+
         this.strict = strict;
         this.boundary = new byte[boundary.length() + 2];
         this.boundary[0] = (byte) '-';
@@ -86,26 +86,26 @@ public class MimeBoundaryInputStream ext
             byte ch = (byte) boundary.charAt(i);
             this.boundary[i + 2] = ch;
         }
-        
+
         fillBuffer();
     }
 
     /**
      * Creates a new MimeBoundaryInputStream.
-     * 
+     *
      * @param inbuffer The underlying stream.
      * @param boundary Boundary string (not including leading hyphens).
      * @throws IllegalArgumentException when boundary is too long
      */
     public MimeBoundaryInputStream(
-            final BufferedLineReaderInputStream inbuffer, 
+            final BufferedLineReaderInputStream inbuffer,
             final String boundary) throws IOException {
         this(inbuffer, boundary, false);
     }
-    
+
     /**
      * Closes the underlying stream.
-     * 
+     *
      * @throws IOException on I/O errors.
      */
     @Override
@@ -119,7 +119,7 @@ public class MimeBoundaryInputStream ext
     public boolean markSupported() {
         return false;
     }
-    
+
     public boolean readAllowed() throws IOException {
         if (completed) {
             return false;
@@ -145,7 +145,7 @@ public class MimeBoundaryInputStream ext
             fillBuffer();
         }
     }
-    
+
     @Override
     public int read(byte[] b, int off, int len) throws IOException {
         for (;;) {
@@ -164,7 +164,7 @@ public class MimeBoundaryInputStream ext
             throw new IllegalArgumentException("Destination buffer may not be null");
         }
         if (!readAllowed()) return -1;
-        
+
         int total = 0;
         boolean found = false;
         int bytesRead = 0;
@@ -199,21 +199,21 @@ public class MimeBoundaryInputStream ext
             return total;
         }
     }
-    
+
     private void verifyEndOfStream() throws IOException {
         if (strict && eof && !atBoundary) {
             throw new MimeIOException(new MimeException("Unexpected end of stream"));
         }
     }
-    
-	private boolean endOfStream() {
+
+    private boolean endOfStream() {
         return eof || atBoundary;
     }
-    
+
     private boolean hasData() {
         return limit > buffer.pos() && limit <= buffer.limit();
     }
-    
+
     private int fillBuffer() throws IOException {
         if (eof) {
             return -1;
@@ -222,12 +222,12 @@ public class MimeBoundaryInputStream ext
         if (!hasData()) {
             bytesRead = buffer.fillBuffer();
             if (bytesRead == -1) {
-            	eof = true;
+                eof = true;
             }
         } else {
             bytesRead = 0;
         }
-        
+
         int i;
         int off = buffer.pos();
         for (;;) {
@@ -235,7 +235,7 @@ public class MimeBoundaryInputStream ext
             if (i == -1) {
                 break;
             }
-            // Make sure the boundary is either at the very beginning of the buffer 
+            // Make sure the boundary is either at the very beginning of the buffer
             // or preceded with LF
             if (i == buffer.pos() || buffer.byteAt(i - 1) == '\n') {
                 int pos = i + boundary.length;
@@ -261,21 +261,21 @@ public class MimeBoundaryInputStream ext
             if (eof) {
                 limit = buffer.limit();
             } else {
-                limit = buffer.limit() - (boundary.length + 2); 
-                                // [LF] [boundary] [CR][LF] minus one char 
+                limit = buffer.limit() - (boundary.length + 2);
+                                // [LF] [boundary] [CR][LF] minus one char
             }
         }
         return bytesRead;
     }
-    
+
     public boolean isEmptyStream() {
         return initialLength == 0;
     }
-    
+
     public boolean isFullyConsumed() {
         return completed && !buffer.hasBufferedData();
     }
-    
+
     private void calculateBoundaryLen() throws IOException {
         boundaryLen = boundary.length;
         int len = limit - buffer.pos();
@@ -293,7 +293,7 @@ public class MimeBoundaryInputStream ext
             }
         }
     }
-    
+
     private void skipBoundary() throws IOException {
         if (!completed) {
             completed = true;
@@ -303,14 +303,14 @@ public class MimeBoundaryInputStream ext
                 if (buffer.length() > 1) {
                     int ch1 = buffer.byteAt(buffer.pos());
                     int ch2 = buffer.byteAt(buffer.pos() + 1);
-                    
+
                     if (checkForLastPart) if (ch1 == '-' && ch2 == '-') {
                         this.lastPart = true;
                         buffer.skip(2);
                         checkForLastPart = false;
                         continue;
                     }
-                    
+
                     if (ch1 == '\r' && ch2 == '\n') {
                         buffer.skip(2);
                         break;
@@ -321,7 +321,7 @@ public class MimeBoundaryInputStream ext
                         // ignoring everything in a line starting with a boundary.
                         buffer.skip(1);
                     }
-                    
+
                 } else {
                     if (eof) {
                         break;
@@ -331,11 +331,11 @@ public class MimeBoundaryInputStream ext
             }
         }
     }
-    
+
     public boolean isLastPart() {
-        return lastPart;        
+        return lastPart;
     }
-    
+
     public boolean eof() {
         return eof && !buffer.hasBufferedData();
     }
@@ -349,8 +349,8 @@ public class MimeBoundaryInputStream ext
         return buffer.toString();
     }
 
-	@Override
-	public boolean unread(ByteArrayBuffer buf) {
-		return false;
-	}
+    @Override
+    public boolean unread(ByteArrayBuffer buf) {
+        return false;
+    }
 }

Modified: james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/io/PositionInputStream.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/io/PositionInputStream.java?rev=1145308&r1=1145307&r2=1145308&view=diff
==============================================================================
--- james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/io/PositionInputStream.java (original)
+++ james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/io/PositionInputStream.java Mon Jul 11 19:48:50 2011
@@ -75,7 +75,7 @@ public class PositionInputStream extends
     @Override
     public long skip(long n) throws IOException {
         final long c = in.skip(n);
-        if (c > 0) 
+        if (c > 0)
             position += c;
         return c;
     }
@@ -83,7 +83,7 @@ public class PositionInputStream extends
     @Override
     public int read(byte b[], int off, int len) throws IOException {
         final int c = in.read(b, off, len);
-        if (c > 0) 
+        if (c > 0)
             position += c;
         return c;
     }

Modified: james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/parser/AbstractContentHandler.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/parser/AbstractContentHandler.java?rev=1145308&r1=1145307&r2=1145308&view=diff
==============================================================================
--- james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/parser/AbstractContentHandler.java (original)
+++ james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/parser/AbstractContentHandler.java Mon Jul 11 19:48:50 2011
@@ -29,48 +29,48 @@ import java.io.InputStream;
 /**
  * Abstract <code>ContentHandler</code> with default implementations of all
  * the methods of the <code>ContentHandler</code> interface.
- * 
+ *
  * The default is to do nothing.
  */
 public abstract class AbstractContentHandler implements ContentHandler {
-    
+
     public void endMultipart() throws MimeException {
     }
-    
+
     public void startMultipart(BodyDescriptor bd) throws MimeException {
     }
-    
+
     public void body(BodyDescriptor bd, InputStream is)
             throws MimeException, IOException {
     }
-    
+
     public void endBodyPart() throws MimeException {
     }
-    
+
     public void endHeader() throws MimeException {
     }
-    
+
     public void endMessage() throws MimeException {
     }
-    
+
     public void epilogue(InputStream is) throws MimeException, IOException {
     }
-    
+
     public void field(Field field) throws MimeException {
     }
-    
+
     public void preamble(InputStream is) throws MimeException, IOException {
     }
-    
+
     public void startBodyPart() throws MimeException {
     }
-    
+
     public void startHeader() throws MimeException {
     }
-    
+
     public void startMessage() throws MimeException {
     }
-    
+
     public void raw(InputStream is) throws MimeException, IOException {
     }
 

Modified: james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/parser/ContentHandler.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/parser/ContentHandler.java?rev=1145308&r1=1145307&r2=1145308&view=diff
==============================================================================
--- james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/parser/ContentHandler.java (original)
+++ james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/parser/ContentHandler.java Mon Jul 11 19:48:50 2011
@@ -30,7 +30,7 @@ import java.io.InputStream;
  * <p>
  * Receives notifications of the content of a plain RFC822 or MIME message.
  * Implement this interface and register an instance of that implementation
- * with a <code>MimeStreamParser</code> instance using its 
+ * with a <code>MimeStreamParser</code> instance using its
  * {@link org.apache.james.mime4j.stream.MimeStreamParser#setContentHandler(ContentHandler)}
  * method. The parser uses the <code>ContentHandler</code> instance to report
  * basic message-related events like the start and end of the body of a
@@ -38,7 +38,7 @@ import java.io.InputStream;
  * </p>
  * <p>
  * Throwing an exception from an event method will terminate the message
- * processing, i.e. no new events will be generated for that message. 
+ * processing, i.e. no new events will be generated for that message.
  * <p>
  * Events will be generated in the order the corresponding elements occur in
  * the message stream parsed by the parser. E.g.:
@@ -75,7 +75,7 @@ import java.io.InputStream;
  * body containing two body parts.
  * </p>
  * <p>
- * See MIME RFCs 2045-2049 for more information on the structure of MIME 
+ * See MIME RFCs 2045-2049 for more information on the structure of MIME
  * messages and RFC 822 and 2822 for the general structure of Internet mail
  * messages.
  * </p>
@@ -83,7 +83,7 @@ import java.io.InputStream;
 public interface ContentHandler {
 
     /**
-     * Called when a new message starts (a top level message or an embedded 
+     * Called when a new message starts (a top level message or an embedded
      * rfc822 message).
      *
      * @throws MimeException on processing errors
@@ -121,7 +121,7 @@ public interface ContentHandler {
 
     /**
      * Called for each field of a header.
-     * 
+     *
      * @param rawField the MIME field.
      * @throws MimeException on processing errors
      */
@@ -137,7 +137,7 @@ public interface ContentHandler {
     /**
      * Called for the preamble (whatever comes before the first body part)
      * of a <code>multipart/*</code> entity.
-     * 
+     *
      * @param is used to get the contents of the preamble.
      * @throws MimeException on processing errors
      * @throws IOException should be thrown on I/O errors.
@@ -145,9 +145,9 @@ public interface ContentHandler {
     void preamble(InputStream is) throws MimeException, IOException;
 
     /**
-     * Called for the epilogue (whatever comes after the final body part) 
+     * Called for the epilogue (whatever comes after the final body part)
      * of a <code>multipart/*</code> entity.
-     * 
+     *
      * @param is used to get the contents of the epilogue.
      * @throws MimeException on processing errors
      * @throws IOException should be thrown on I/O errors.
@@ -156,11 +156,11 @@ public interface ContentHandler {
 
     /**
      * Called when the body of a multipart entity is about to be parsed.
-     * 
-     * @param bd encapsulates the values (either read from the 
-     *        message stream or, if not present, determined implictly 
-     *        as described in the 
-     *        MIME rfc:s) of the <code>Content-Type</code> and 
+     *
+     * @param bd encapsulates the values (either read from the
+     *        message stream or, if not present, determined implictly
+     *        as described in the
+     *        MIME rfc:s) of the <code>Content-Type</code> and
      *        <code>Content-Transfer-Encoding</code> header fields.
      * @throws MimeException on processing errors
      */
@@ -174,11 +174,11 @@ public interface ContentHandler {
     void endMultipart() throws MimeException;
 
     /**
-     * Called when the body of a discrete (non-multipart) entity is about to 
+     * Called when the body of a discrete (non-multipart) entity is about to
      * be parsed.
-     * 
+     *
      * @param bd see {@link #startMultipart(BodyDescriptor)}
-     * @param is the contents of the body. NOTE: this is the raw body contents 
+     * @param is the contents of the body. NOTE: this is the raw body contents
      *           - it will not be decoded if encoded. The <code>bd</code>
      *           parameter should be used to determine how the stream data
      *           should be decoded.
@@ -189,9 +189,9 @@ public interface ContentHandler {
         throws MimeException, IOException;
 
     /**
-     * Called when a new entity (message or body part) starts and the 
+     * Called when a new entity (message or body part) starts and the
      * parser is in <code>raw</code> mode.
-     * 
+     *
      * @param is the raw contents of the entity.
      * @throws MimeException on processing errors
      * @throws IOException should be thrown on I/O errors.