public final class MimeStorageUtility
extends java.lang.Object
MimeStorageUtility - Provides MIME-specific storage utility methods.| Modifier and Type | Method and Description |
|---|---|
static javax.mail.FetchProfile |
cloneFetchProfile(javax.mail.FetchProfile toClone)
Clones specified fetch profile:
|
static java.util.Collection<MailField> |
fetchProfile2MailListFields(javax.mail.FetchProfile fetchProfile)
Creates an appropriate collection of
MailField enumeration constants from given fetch profile |
static javax.mail.FetchProfile |
getCacheFetchProfile()
Messages which are pre-filled with the fetch profile returned by this method are completely pre-filles with all data that can occur
in a listing.
|
static java.util.Collection<MailField> |
getCacheFields()
The corresponding fields to fetch profile obtained by
getCacheFetchProfile() |
static MailField[] |
getCacheFieldsArray()
The corresponding fields to fetch profile obtained by
getCacheFetchProfile() |
static javax.mail.FetchProfile |
getFetchProfile(MailField[] fields,
boolean preferEnvelope)
Gets the appropriate fetch profile.
|
static javax.mail.FetchProfile |
getFetchProfile(MailField[] fields,
MailField[] searchFields,
MailField sortField,
boolean preferEnvelope)
Gets the appropriate fetch profile
Note that
MailField.BODY and MailField.FULL are discarded since no corresponding fetch profile item exists and
therefore should be handled separately. |
static javax.mail.FetchProfile |
getFetchProfile(MailField[] fields,
MailField sortField,
boolean preferEnvelope)
Gets the appropriate fetch profile
Note that
MailField.BODY and MailField.FULL are discarded since no corresponding fetch profile item exists and
therefore should be handled separately. |
static javax.mail.FetchProfile |
getFetchProfile(MailField[] fields,
java.lang.String[] headerNames,
MailField[] searchFields,
MailField sortField,
boolean preferEnvelope)
Gets the appropriate fetch profile
Note that
MailField.BODY and MailField.FULL are discarded since no corresponding fetch profile item exists and
therefore should be handled separately. |
static javax.mail.FetchProfile |
getFlagsFetchProfile() |
static javax.mail.FetchProfile |
getUIDFetchProfile() |
static com.sun.mail.imap.protocol.UIDSet[] |
toUIDSet(long[] uids)
Turns given array of
long into an array of com.sun.mail.imap.protocol.UIDSet which in turn can be used for
a varieties of IMAPProtocol methods. |
public static javax.mail.FetchProfile cloneFetchProfile(javax.mail.FetchProfile toClone)
toClone - The fetch profile to clonepublic static java.util.Collection<MailField> getCacheFields()
getCacheFetchProfile()getCacheFetchProfile()public static MailField[] getCacheFieldsArray()
getCacheFetchProfile()getCacheFetchProfile()public static javax.mail.FetchProfile getCacheFetchProfile()
FetchProfile to pre-fill messages ready for being put into cachepublic static javax.mail.FetchProfile getUIDFetchProfile()
FetchProfile which only prefills messages with their UIDspublic static javax.mail.FetchProfile getFlagsFetchProfile()
FetchProfile which only prefills messages with their flagspublic static java.util.Collection<MailField> fetchProfile2MailListFields(javax.mail.FetchProfile fetchProfile)
MailField enumeration constants from given fetch profilefetchProfile - The fetch profileMailField enumeration constantspublic static com.sun.mail.imap.protocol.UIDSet[] toUIDSet(long[] uids)
long into an array of com.sun.mail.imap.protocol.UIDSet which in turn can be used for
a varieties of IMAPProtocol methods.uids - - the UIDscom.sun.mail.imap.protocol.UIDSetpublic static javax.mail.FetchProfile getFetchProfile(MailField[] fields, boolean preferEnvelope)
Note that MailField.BODY and MailField.FULL are discarded since no corresponding fetch profile item exists and
therefore should be handled separately.
fields - The fieldspreferEnvelope - true to prefer ENVELOPE instead of single fetch items; otherwise falsepublic static javax.mail.FetchProfile getFetchProfile(MailField[] fields, MailField sortField, boolean preferEnvelope)
Note that MailField.BODY and MailField.FULL are discarded since no corresponding fetch profile item exists and
therefore should be handled separately.
fields - The fieldssortField - The sort fieldpreferEnvelope - true to prefer ENVELOPE instead of single fetch items; otherwise falsepublic static javax.mail.FetchProfile getFetchProfile(MailField[] fields, MailField[] searchFields, MailField sortField, boolean preferEnvelope)
Note that MailField.BODY and MailField.FULL are discarded since no corresponding fetch profile item exists and
therefore should be handled separately.
fields - The fieldssearchFields - The search fieldssortField - The sort fieldpreferEnvelope - true to prefer ENVELOPE instead of single fetch items; otherwise falsepublic static javax.mail.FetchProfile getFetchProfile(MailField[] fields, java.lang.String[] headerNames, MailField[] searchFields, MailField sortField, boolean preferEnvelope)
Note that MailField.BODY and MailField.FULL are discarded since no corresponding fetch profile item exists and
therefore should be handled separately.
fields - The fieldsheaderNames - The header namessearchFields - The search fieldssortField - The sort fieldpreferEnvelope - true to prefer ENVELOPE instead of single fetch items; otherwise false