Package com.sun.mail.imap.protocol
Class IMAPResponse
java.lang.Object
com.sun.mail.iap.Response
com.sun.mail.imap.protocol.IMAPResponse
- Direct Known Subclasses:
FetchResponse
This class represents a response obtained from the input stream
of an IMAP server.
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionCopy constructor.For testing.IMAPResponse
(String r, boolean utf8) For testing. -
Method Summary
Methods inherited from class com.sun.mail.iap.Response
byeResponse, getException, getRest, getTag, getType, isBAD, isBYE, isContinuation, isNextNonSpace, isNO, isOK, isSynthetic, isTagged, isUnTagged, peekByte, readAtom, readAtomString, readAtomStringList, readByte, readByteArray, readBytes, readLong, readNumber, readString, readString, readStringList, reset, skip, skipSpaces, skipToken, supportsUtf8, toString
-
Constructor Details
-
IMAPResponse
- Throws:
IOException
ProtocolException
-
IMAPResponse
Copy constructor.- Parameters:
r
- the IMAPResponse to copy
-
IMAPResponse
For testing.- Parameters:
r
- the response string- Throws:
IOException
- for I/O errorsProtocolException
- for protocol failures
-
IMAPResponse
For testing.- Parameters:
r
- the response stringutf8
- UTF-8 allowed?- Throws:
IOException
- for I/O errorsProtocolException
- for protocol failures- Since:
- JavaMail 1.6.0
-
-
Method Details
-
readSimpleList
Read a list of space-separated "flag-extension" sequences and return the list as a array of Strings. An empty list is returned as null. Each item is expected to be an atom, possibly preceeded by a backslash, but we aren't that strict; we just look for strings separated by spaces and terminated by a right paren. We assume items are always ASCII.- Returns:
- the list items as a String array
-
getKey
-
keyEquals
-
getNumber
public int getNumber()
-