|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.icegreen.greenmail.imap.commands.CommandParser
public class CommandParser
Nested Class Summary | |
---|---|
protected class |
CommandParser.ATOM_CHARValidator
|
protected static interface |
CommandParser.CharacterValidator
Provides the ability to ensure characters are part of a permitted set. |
protected class |
CommandParser.DigitCharValidator
|
protected class |
CommandParser.NoopCharValidator
|
Constructor Summary | |
---|---|
CommandParser()
|
Method Summary | |
---|---|
String |
astring(ImapRequestLineReader request)
Reads an argument of type "astring" from the request. |
String |
atom(ImapRequestLineReader request)
Reads an argument of type "atom" from the request. |
byte[] |
base64(ImapRequestLineReader request)
Reads a base64 argument from the request. |
protected void |
consumeChar(ImapRequestLineReader request,
char expected)
Consumes the next character in the request, checking that it matches the expected one. |
protected String |
consumeLiteral(ImapRequestLineReader request)
Reads an argument of type "literal" from the request, in the format: "{" charCount "}" CRLF *CHAR8 Note before calling, the request should be positioned so that nextChar is '{'. |
protected String |
consumeQuoted(ImapRequestLineReader request)
Reads a quoted string value from the request. |
protected String |
consumeWord(ImapRequestLineReader request,
CommandParser.CharacterValidator validator)
Reads the next "word from the request, comprising all characters up to the next SPACE. |
Date |
date(ImapRequestLineReader request)
Reads a "date" argument from the request. |
Date |
dateTime(ImapRequestLineReader request)
Reads a "date-time" argument from the request. |
void |
endLine(ImapRequestLineReader request)
Consumes the request up to and including the eno-of-line. |
Flags |
flagList(ImapRequestLineReader request)
Reads a "flags" argument from the request. |
protected boolean |
isListWildcard(char chr)
|
String |
mailbox(ImapRequestLineReader request)
Reads a "mailbox" argument from the request. |
String |
nstring(ImapRequestLineReader request)
Reads an argument of type "nstring" from the request. |
long |
number(ImapRequestLineReader request)
Reads an argument of type "number" from the request. |
long |
nzNumber(ImapRequestLineReader request)
Reads an argument of type "nznumber" (a non-zero number) (NOTE this isn't strictly as per the spec, since the spec disallows numbers such as "0123" as nzNumbers (although it's ok as a "number". |
IdRange[] |
parseIdRange(ImapRequestLineReader request)
Reads a "message set" argument, and parses into an IdSet. |
void |
setFlag(String flagString,
Flags flags)
|
String |
tag(ImapRequestLineReader request)
Reads a command "tag" from the request. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CommandParser()
Method Detail |
---|
public String atom(ImapRequestLineReader request) throws ProtocolException
ProtocolException
public String tag(ImapRequestLineReader request) throws ProtocolException
ProtocolException
public String astring(ImapRequestLineReader request) throws ProtocolException
ProtocolException
public String nstring(ImapRequestLineReader request) throws ProtocolException
ProtocolException
public String mailbox(ImapRequestLineReader request) throws ProtocolException
ProtocolException
public Date dateTime(ImapRequestLineReader request) throws ProtocolException
ProtocolException
public Date date(ImapRequestLineReader request) throws ProtocolException
ProtocolException
protected String consumeWord(ImapRequestLineReader request, CommandParser.CharacterValidator validator) throws ProtocolException
ProtocolException
protected String consumeLiteral(ImapRequestLineReader request) throws ProtocolException
ProtocolException
protected void consumeChar(ImapRequestLineReader request, char expected) throws ProtocolException
ProtocolException
protected String consumeQuoted(ImapRequestLineReader request) throws ProtocolException
ProtocolException
public byte[] base64(ImapRequestLineReader request) throws ProtocolException
ProtocolException
public Flags flagList(ImapRequestLineReader request) throws ProtocolException
ProtocolException
public void setFlag(String flagString, Flags flags) throws ProtocolException
ProtocolException
public long number(ImapRequestLineReader request) throws ProtocolException
ProtocolException
public long nzNumber(ImapRequestLineReader request) throws ProtocolException
ProtocolException
protected boolean isListWildcard(char chr)
public void endLine(ImapRequestLineReader request) throws ProtocolException
request
- The request
ProtocolException
- If characters are encountered before the endLine.public IdRange[] parseIdRange(ImapRequestLineReader request) throws ProtocolException
ProtocolException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |