Package com.sun.mail.imap.protocol
Class SearchSequence
java.lang.Object
com.sun.mail.imap.protocol.SearchSequence
This class traverses a search-tree and generates the
corresponding IMAP search sequence.
Each IMAPProtocol instance contains an instance of this class,
which might be subclassed by subclasses of IMAPProtocol to add
support for additional product-specific search terms.
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.Create a SearchSequence for this IMAPProtocol. -
Method Summary
Modifier and TypeMethodDescriptiongenerateSequence
(SearchTerm term, String charset) Generate the IMAP search sequence for the given search expression.static boolean
Does this string contain only ASCII characters?static boolean
isAscii
(SearchTerm term) Check if the "text" terms in the given SearchTerm contain non US-ASCII characters.static boolean
isAscii
(SearchTerm[] terms) Check if any of the "text" terms in the given SearchTerms contain non US-ASCII characters.
-
Constructor Details
-
SearchSequence
Create a SearchSequence for this IMAPProtocol.- Parameters:
p
- the IMAPProtocol object for the server- Since:
- JavaMail 1.6.0
-
SearchSequence
Deprecated.Create a SearchSequence.
-
-
Method Details
-
generateSequence
public Argument generateSequence(SearchTerm term, String charset) throws SearchException, IOException Generate the IMAP search sequence for the given search expression.- Parameters:
term
- the search termcharset
- charset for the search- Returns:
- the SEARCH Argument
- Throws:
SearchException
- for failuresIOException
- for I/O errors
-
isAscii
Check if the "text" terms in the given SearchTerm contain non US-ASCII characters.- Parameters:
term
- the search term- Returns:
- true if only ASCII
-
isAscii
Check if any of the "text" terms in the given SearchTerms contain non US-ASCII characters.- Parameters:
terms
- the search terms- Returns:
- true if only ASCII
-
isAscii
Does this string contain only ASCII characters?- Parameters:
s
- the string- Returns:
- true if only ASCII
-