Class MboxIterator
java.lang.Object
org.apache.james.mime4j.mboxiterator.MboxIterator
- All Implemented Interfaces:
Closeable,AutoCloseable,Iterable<CharBufferWrapper>
Class that provides an iterator over email messages inside an mbox file. An mbox file is a sequence of email messages separated by From_ lines.
Description ot the file format:
- http://tools.ietf.org/html/rfc4155
- http://qmail.org/man/man5/mbox.html
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic StringbufferDetailsToString(Buffer buffer) Utility method to log important details about buffers.voidclose()static MboxIterator.Builderstatic MboxIterator.Builderstatic MboxIterator.Builderprotected voidinitialize the Mailbox iteratoriterator()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
initMboxIterator
initialize the Mailbox iterator- Throws:
IOExceptionCharConversionException
-
iterator
- Specified by:
iteratorin interfaceIterable<CharBufferWrapper>
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
fromFile
-
fromFile
-
fromFile
-
bufferDetailsToString
Utility method to log important details about buffers.- Parameters:
buffer-
-