Package org.apache.commons.net.imap
Class IMAPReply
java.lang.Object
org.apache.commons.net.imap.IMAPReply
Stores IMAP reply code constants.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intThe reply code indicating command rejection.static final intThe reply code indicating command continuation.static final intThe reply code indicating failure of an operation.static final intThe reply code indicating success of an operation.static final intThe reply code indicating a partial response.
- 
Method SummaryModifier and TypeMethodDescriptionstatic intgetReplyCode(String line) Interpret the String reply code - OK, NO, BAD - in a tagged response as an integer.static intgetUntaggedReplyCode(String line) Interpret the String reply code - OK, NO, BAD - in an untagged response as an integer.static booleanisContinuation(int replyCode) Tests whether the reply line is a continuation, i.e.static booleanisContinuation(String line) Tests whether if the reply line is a continuation, i.e.static booleanisSuccess(int replyCode) Tests whether whether the reply code indicates success or notstatic booleanisUntagged(String line) Tests whether if the reply line is untagged - e.g.static intliteralCount(String line) Checks if the line introduces a literal, i.e.
- 
Field Details- 
OKThe reply code indicating success of an operation.- See Also:
 
- 
NOThe reply code indicating failure of an operation.- See Also:
 
- 
BADThe reply code indicating command rejection.- See Also:
 
- 
CONTThe reply code indicating command continuation.- See Also:
 
- 
PARTIALThe reply code indicating a partial response. This is used when a chunk listener is registered and the listener requests that the reply lines are cleared on return.- Since:
- 3.4
- See Also:
 
 
- 
- 
Method Details- 
getReplyCodeInterpret the String reply code - OK, NO, BAD - in a tagged response as an integer.- Parameters:
- line- the tagged line to be checked
- Returns:
- OKor- NOor- BADor- CONT
- Throws:
- IOException- if the input has an unexpected format
 
- 
getUntaggedReplyCodeInterpret the String reply code - OK, NO, BAD - in an untagged response as an integer.- Parameters:
- line- the untagged line to be checked
- Returns:
- OKor- NOor- BADor- CONT
- Throws:
- IOException- if the input has an unexpected format
 
- 
isContinuationTests whether the reply line is a continuation, i.e. starts with "+"- Parameters:
- replyCode- the code to be checked
- Returns:
- trueif the response was a continuation
 
- 
isContinuationTests whether if the reply line is a continuation, i.e. starts with "+"- Parameters:
- line- the line to be checked
- Returns:
- trueif the line is a continuation
 
- 
isSuccessTests whether whether the reply code indicates success or not- Parameters:
- replyCode- the code to check
- Returns:
- trueif the code equals- OK
 
- 
isUntaggedTests whether if the reply line is untagged - e.g. "* OK ..."- Parameters:
- line- to be checked
- Returns:
- trueif the line is untagged
 
- 
literalCountChecks if the line introduces a literal, i.e. ends with {dd}- Parameters:
- line- the line to check
- Returns:
- the literal count, or -1 if there was no literal.
 
 
-