public Flags flagList ( ImapRequestLineReader request ) throws ProtocolException { Flags flags = new Flags ( ) ; request . nextWordChar ( ) ; consumeChar ( request , ' ' ) ; CharacterValidator validator = new NoopCharValidator ( ) ; String nextWord = consumeWord ( request , validator ) ; while ( ! nextWord . endsWith ( ")" ) ) { setFlag ( nextWord , flags ) ; nextWord = consumeWord ( request , validator ) ; } // Got the closing ")", may be attached to a word. if ( nextWord . length ( ) > 1 ) { setFlag ( nextWord . substring ( 0 , nextWord . length ( ) - 1 ) , flags ) ; } return flags ; }
Reads a flags argument from the request .