Package org.apache.james.imap.decode.ImapRequestLineReader

Examples of org.apache.james.imap.decode.ImapRequestLineReader.CharacterValidator


    StatusDataItems statusDataItems(ImapRequestLineReader request) throws DecodingException {
        StatusDataItems items = new StatusDataItems();

        request.nextWordChar();
        request.consumeChar('(');
        CharacterValidator validator = new ImapRequestLineReader.NoopCharValidator();
        String nextWord = request.consumeWord(validator);

        while (!nextWord.endsWith(")")) {
            addItem(nextWord, items);
            nextWord = request.consumeWord(validator);
View Full Code Here


        char next = request.nextWordChar();
        if (next == '(') {
            // Seems like we have a CONDSTORE parameter
            request.consume();
           
            request.consumeWord(new CharacterValidator() {
                private int pos = 0;
                public boolean isValid(char chr) {
                    if (pos >= UNCHANGEDSINCE.length) {
                        return false;
                    } else {
View Full Code Here

                next = request.nextChar();
                switch (next) {
                case 'C':
                    // Now check for the CHANGEDSINCE option which is part of CONDSTORE
                    request.consumeWord(new CharacterValidator() {
                        int pos = 0;
                        public boolean isValid(char chr) {
                            if (pos > CHANGEDSINCE.length) {
                                return false;
                            } else {
                                return CHANGEDSINCE[pos++] == ImapRequestLineReader.cap(chr);
                            }
                        }
                    });
                    fetch.setChangedSince(request.number(true));
                   
                    break;
               
                case 'V':
                    // Check for the VANISHED option which is part of QRESYNC
                    request.consumeWord(new CharacterValidator() {
                        int pos = 0;
                        public boolean isValid(char chr) {
                            if (pos > VANISHED.length) {
                                return false;
                            } else {
View Full Code Here

                }
                condstore = true;
                break;
            case 'Q':
                // It starts with Q so it should be QRESYNC
                request.consumeWord(new CharacterValidator() {
                    int pos = 0;

                    public boolean isValid(char chr) {
                        if (pos >= QRESYNC.length) {
                            return false;
View Full Code Here

            return SearchKey.buildModSeq(request.number());
        } catch (DecodingException e) {
            // Just consume the [<entry-name> <entry-type-req>] and ignore it
            // See RFC4551 3.4. MODSEQ Search Criterion in SEARCH
            request.consumeQuoted();
            request.consumeWord(new CharacterValidator() {
               
                /*
                 * (non-Javadoc)
                 * @see org.apache.james.imap.decode.ImapRequestLineReader.CharacterValidator#isValid(char)
                 */
 
View Full Code Here

    StatusDataItems statusDataItems(ImapRequestLineReader request) throws DecodingException {
        StatusDataItems items = new StatusDataItems();

        request.nextWordChar();
        request.consumeChar('(');
        CharacterValidator validator = new ImapRequestLineReader.NoopCharValidator();
        String nextWord = request.consumeWord(validator);

        while (!nextWord.endsWith(")")) {
            addItem(nextWord, items);
            nextWord = request.consumeWord(validator);
View Full Code Here

TOP

Related Classes of org.apache.james.imap.decode.ImapRequestLineReader.CharacterValidator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.