Class IterateOverMbox
java.lang.Object
org.apache.james.mime4j.samples.mbox.IterateOverMbox
Simple example of how to use Apache Mime4j Mbox Iterator. We split one mbox file file into
individual email messages.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
private static String
messageSummary
(InputStream messageBytes) Parse a message and return a simpleString
representation of some important fields.private static String
retrieveMBoxFileName
(String[] args) private static void
saveMessageToFile
(int count, CharBuffer buf)
-
Field Details
-
ENCODER
-
-
Constructor Details
-
IterateOverMbox
public IterateOverMbox()
-
-
Method Details
-
main
- Throws:
Exception
-
retrieveMBoxFileName
-
saveMessageToFile
- Throws:
IOException
-
messageSummary
Parse a message and return a simpleString
representation of some important fields.- Parameters:
messageBytes
- the message asInputStream
- Returns:
- String
- Throws:
IOException
MimeException
-