|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.abstracthorizon.mercury.imap.util.MessageUtilities
public class MessageUtilities
Utility methods for working with messages
Field Summary | |
---|---|
static String |
CRLF
CR/LF |
static SimpleDateFormat |
dateFormat
Date format |
Constructor Summary | |
---|---|
MessageUtilities()
|
Method Summary | |
---|---|
static void |
composedSequenceIterator(IMAPSession session,
MessageProcessor processor,
javax.mail.Folder f,
ComposedSequence sequenceSet,
boolean asuid)
Iterates over sequence for given folder's messages |
static String |
createHeaders(javax.mail.internet.MimePart m)
Creates string representation of headers for mime part |
static String |
createHeaders(javax.mail.internet.MimePart m,
Enumeration<?> headers)
Creates string representation of headers for mime part |
static String |
createHeaders(javax.mail.internet.MimePart m,
List<String> headers,
boolean not)
Creates string representation of headers for mime part |
static javax.mail.Message |
findMessageByUID(javax.mail.Folder f,
long uid)
Find message by UID |
static long |
findUID(javax.mail.Message m)
Returns messages's UID |
static long |
maxUID(javax.mail.Folder f)
Returns maximum UID form the folder |
static void |
sequenceIterator(IMAPSession session,
MessageProcessor processor,
javax.mail.Folder f,
Sequence sequenceSet,
boolean asuid)
Iterates over sequence for given folder's messages |
static void |
sequenceIteratorOld(IMAPSession session,
MessageProcessor processor,
javax.mail.Folder f,
Sequence sequenceSet,
boolean asuid)
Iterates over sequence for given folder's messages |
static void |
simpleSequenceIterator(IMAPSession session,
MessageProcessor processor,
javax.mail.Folder f,
SimpleSequence sequenceSet,
boolean asuid)
Iterates over sequence for given folder's messages |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static SimpleDateFormat dateFormat
public static final String CRLF
Constructor Detail |
---|
public MessageUtilities()
Method Detail |
---|
public static javax.mail.Message findMessageByUID(javax.mail.Folder f, long uid) throws javax.mail.MessagingException
f
- folderuid
- uid
javax.mail.MessagingException
- if folder is not of UIDFolder
typepublic static long findUID(javax.mail.Message m) throws javax.mail.MessagingException
m
- message
javax.mail.MessagingException
- if folder is not of UIDFolder
typepublic static String createHeaders(javax.mail.internet.MimePart m) throws javax.mail.MessagingException
m
- mime part
javax.mail.MessagingException
public static String createHeaders(javax.mail.internet.MimePart m, List<String> headers, boolean not) throws javax.mail.MessagingException
m
- mime partheaders
- headersnot
- should headers form the list be included or excluded
javax.mail.MessagingException
public static String createHeaders(javax.mail.internet.MimePart m, Enumeration<?> headers) throws javax.mail.MessagingException
m
- mime partheaders
- headers
javax.mail.MessagingException
public static void sequenceIterator(IMAPSession session, MessageProcessor processor, javax.mail.Folder f, Sequence sequenceSet, boolean asuid) throws IOException, javax.mail.MessagingException
session
- imap sessionprocessor
- message processorf
- foldersequenceSet
- sequenceasuid
- does sequence represent UIDs or positions of messages
IOException
javax.mail.MessagingException
public static void composedSequenceIterator(IMAPSession session, MessageProcessor processor, javax.mail.Folder f, ComposedSequence sequenceSet, boolean asuid) throws IOException, javax.mail.MessagingException
session
- imap sessionprocessor
- message processorf
- foldersequenceSet
- sequenceasuid
- does sequence represent UIDs or positions of messages
IOException
javax.mail.MessagingException
public static void simpleSequenceIterator(IMAPSession session, MessageProcessor processor, javax.mail.Folder f, SimpleSequence sequenceSet, boolean asuid) throws IOException, javax.mail.MessagingException
session
- imap sessionprocessor
- message processorf
- foldersequenceSet
- sequenceasuid
- does sequence represent UIDs or positions of messages
IOException
javax.mail.MessagingException
public static void sequenceIteratorOld(IMAPSession session, MessageProcessor processor, javax.mail.Folder f, Sequence sequenceSet, boolean asuid) throws IOException, javax.mail.MessagingException
session
- imap sessionprocessor
- message processorf
- foldersequenceSet
- sequenceasuid
- does sequence represent UIDs or positions of messages
IOException
javax.mail.MessagingException
public static long maxUID(javax.mail.Folder f) throws javax.mail.MessagingException
f
- folder
javax.mail.MessagingException
- if folder is not of UIDFolder
type
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |