Class POP3ExportMbox
- java.lang.Object
-
- org.apache.commons.net.examples.mail.POP3ExportMbox
-
public final class POP3ExportMbox extends java.lang.Object
This is an example program demonstrating how to use the POP3[S]Client class. This program connects to a POP3[S] server and writes the messages to an mbox file.The code currently assumes that POP3Client decodes the POP3 data as iso-8859-1. The POP3 standard only allows for ASCII so in theory iso-8859-1 should be OK. However, it appears that actual POP3 implementations may return 8bit data that is outside the ASCII range; this may result in loss of data when the mailbox is created.
See main() method for usage details
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.regex.Pattern
PATFROM
-
Constructor Summary
Constructors Constructor Description POP3ExportMbox()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
main(java.lang.String[] args)
private static boolean
startsWith(java.lang.String input, java.util.regex.Pattern pat)
private static void
writeFile(POP3Client pop3, java.io.OutputStreamWriter fw, int i)
private static void
writeMbox(POP3Client pop3, java.io.OutputStreamWriter fw, int i)
-
-
-
Method Detail
-
main
public static void main(java.lang.String[] args)
-
startsWith
private static boolean startsWith(java.lang.String input, java.util.regex.Pattern pat)
-
writeFile
private static void writeFile(POP3Client pop3, java.io.OutputStreamWriter fw, int i) throws java.io.IOException
- Throws:
java.io.IOException
-
writeMbox
private static void writeMbox(POP3Client pop3, java.io.OutputStreamWriter fw, int i) throws java.io.IOException
- Throws:
java.io.IOException
-
-