* @see org.apache.james.imap.encode.base.AbstractChainedImapEncoder#doEncode
* (org.apache.james.imap.api.ImapMessage, org.apache.james.imap.encode.ImapResponseComposer,
* org.apache.james.imap.api.process.ImapSession)
*/
protected void doEncode(ImapMessage acceptableMessage, ImapResponseComposer composer, ImapSession session) throws IOException {
ESearchResponse response = (ESearchResponse) acceptableMessage;
String tag = response.getTag();
long min = response.getMinUid();
long max = response.getMaxUid();
long count = response.getCount();
IdRange[] all = response.getAll();
boolean useUid = response.getUseUid();
Long highestModSeq = response.getHighestModSeq();
List<SearchResultOption> options = response.getSearchResultOptions();
composer.untagged().message("ESEARCH").openParen().message("TAG").quote(tag).closeParen();
if (useUid) {
composer.message("UID");
}