Top Description Classes
[default module]

Package javax.mail.search


Message search terms for the JavaMail API. This package defines classes that can be used to construct a search expression to search a folder for messages matching the expression; see the search method on javax.mail.Folder. See SearchTerm.

Note that the exact search capabilities depend on the protocol, provider, and server in use. For the POP3 protocol, all searching is done on the client side using the JavaMail classes. For IMAP, all searching is done on the server side and is limited by the search capabilities of the IMAP protocol and the IMAP server being used. For example, IMAP date based searches have only day granularity.

In general, all of the string patterns supported by search terms are just simple strings; no regular expressions are supported.

Class Summary

Modifier and TypeClass and Description
public abstract class
AddressStringTerm

This abstract class implements string comparisons for Message addresses.

public abstract class
AddressTerm

This class implements Message Address comparisons.

public class
AndTerm

This class implements the logical AND operator on individual SearchTerms.

public class
BodyTerm

This class implements searches on a message body.

public abstract class
ComparisonTerm

This class models the comparison operator.

public abstract class
DateTerm

This class implements comparisons for Dates

public class
FlagTerm

This class implements comparisons for Message Flags.

public class
FromStringTerm

This class implements string comparisons for the From Address header.

public class
FromTerm

This class implements comparisons for the From Address header.

public class
HeaderTerm

This class implements comparisons for Message headers.

public abstract class
IntegerComparisonTerm

This class implements comparisons for integers.

public class
MessageIDTerm

This term models the RFC822 "MessageId" - a message-id for Internet messages that is supposed to be unique per message.

public class
MessageNumberTerm

This class implements comparisons for Message numbers.

public class
NotTerm

This class implements the logical NEGATION operator.

public class
OrTerm

This class implements the logical OR operator on individual SearchTerms.

public class
ReceivedDateTerm

This class implements comparisons for the Message Received date

public class
RecipientStringTerm

This class implements string comparisons for the Recipient Address headers.

public class
RecipientTerm

This class implements comparisons for the Recipient Address headers.

public class
SearchException

The exception thrown when a Search expression could not be handled.

public abstract class
SearchTerm

Search criteria are expressed as a tree of search-terms, forming a parse-tree for the search expression.

public class
SentDateTerm

This class implements comparisons for the Message SentDate.

public class
SizeTerm

This class implements comparisons for Message sizes.

public abstract class
StringTerm

This class implements the match method for Strings.

public class
SubjectTerm

This class implements comparisons for the message Subject header.