| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public class Response extends Object
This class represents a response obtained from the input stream of an IMAP server.
Field Summary | |
---|---|
static int |
BAD
|
protected byte[] |
buffer
|
static int |
BYE
|
static int |
CONTINUATION
|
protected int |
index
|
static int |
NO
|
static int |
OK
|
protected int |
pindex
|
protected int |
size
|
static int |
SYNTHETIC
|
protected String |
tag
|
static int |
TAGGED
|
static int |
TAG_MASK
|
protected int |
type
|
static int |
TYPE_MASK
|
static int |
UNTAGGED
|
Constructor Summary | |
---|---|
Read a new Response from the given Protocol |
|
Copy constructor. |
|
|
Method Summary | |
---|---|
static Response |
byeResponse(Exception ex) Return a Response object that looks like a BYE protocol response. |
String |
getRest() Return the rest of the response as a string, usually used to return the arbitrary message text after a NO response. |
String |
getTag() Return the tag, if this is a tagged statement. |
int |
getType() |
boolean |
isBAD() |
boolean |
isBYE() |
boolean |
|
boolean |
isNO() |
boolean |
isOK() |
boolean |
|
boolean |
isTagged() |
boolean |
|
byte |
peekByte() |
String |
readAtom() Extract an ATOM, starting at the current position. |
String |
readAtom(char delim) Extract an ATOM, but stop at the additional delimiter (if not NUL). |
String |
Extract an ASTRING, starting at the current position and return as a String. |
byte |
readByte() Return the next byte from this Statement. |
ByteArray |
Extract a NSTRING, starting at the current position. |
ByteArrayInputStream |
Extract a NSTRING, starting at the current position. |
long |
readLong() Extract a long number, starting at the current position. |
int |
Extract an integer, starting at the current position. |
String |
Extract a NSTRING, starting at the current position. |
String |
readString(char delim) Read a string as an arbitrary sequence of characters, stopping at the delimiter Used to read part of a response code inside []. |
String[] |
|
void |
reset() Reset pointer to beginning of response. |
void |
skip(int count) |
void |
|
void |
Skip to the next space, for use in error recovery while parsing. |
String |
toString() |
Field Detail |
---|
public static final int BAD
protected byte[] buffer
public static final int BYE
public static final int CONTINUATION
protected int index
public static final int NO
public static final int OK
protected int pindex
protected int size
public static final int SYNTHETIC
protected String tag
public static final int TAGGED
public static final int TAG_MASK
protected int type
public static final int TYPE_MASK
public static final int UNTAGGED
Constructor Detail |
---|
public Response(Protocol p) throws IOException, ProtocolException
p
- the Protocol objectIOException
ProtocolException
public Response(Response r)
r
public Response(String s)
s
Method Detail |
---|
public static Response byeResponse(Exception ex)
ex
public String getRest()
public String getTag()
public int getType()
public boolean isBAD()
public boolean isBYE()
public boolean isContinuation()
public boolean isNO()
public boolean isOK()
public boolean isSynthetic()
public boolean isTagged()
public boolean isUnTagged()
public byte peekByte()
public String readAtom()
public String readAtom(char delim)
delim
public String readAtomString()
public byte readByte()
public ByteArray readByteArray()
public ByteArrayInputStream readBytes()
public long readLong()
public int readNumber()
public String readString()
public String readString(char delim)
delim
public String[] readStringList()
public void reset()
public void skip(int count)
count
public void skipSpaces()
public void skipToken()
public String toString()
toString
in class Object
| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |