Package com.sun.mail.imap.protocol
Class FetchResponse
java.lang.Object
com.sun.mail.iap.Response
com.sun.mail.imap.protocol.IMAPResponse
com.sun.mail.imap.protocol.FetchResponse
This class represents a FETCH response obtained from the input stream
of an IMAP server.
- Author:
- John Mani, Bill Shannon
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionFetchResponse(IMAPResponse r, FetchItem[] fitems) Construct a FetchResponse that handles the additional FetchItems. -
Method Summary
Modifier and TypeMethodDescriptionReturn a map of the extension items found in this fetch response.getItem(int index) static <T extends Item>
TReturn the first fetch response item of the given class for the given message number.<T extends Item>
TintReturn all fetch response items of the given class for the given message number.Methods inherited from class com.sun.mail.imap.protocol.IMAPResponse
getKey, getNumber, keyEquals, readSimpleListMethods 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
-
FetchResponse
- Throws:
IOExceptionProtocolException
-
FetchResponse
- Throws:
IOExceptionProtocolException
-
FetchResponse
Construct a FetchResponse that handles the additional FetchItems.- Parameters:
r- the IMAPResponsefitems- the fetch items- Throws:
IOException- for I/O errorsProtocolException- for protocol failures- Since:
- JavaMail 1.4.6
-
-
Method Details
-
getItemCount
public int getItemCount() -
getItem
-
getItem
-
getItem
Return the first fetch response item of the given class for the given message number.- Type Parameters:
T- the type of fetch item- Parameters:
r- the responsesmsgno- the message numberc- the class- Returns:
- the fetch item
-
getItems
Return all fetch response items of the given class for the given message number.- Type Parameters:
T- the type of fetch items- Parameters:
r- the responsesmsgno- the message numberc- the class- Returns:
- the list of fetch items
- Since:
- JavaMail 1.5.2
-
getExtensionItems
Return a map of the extension items found in this fetch response. The map is indexed by extension item name. Callers should not modify the map.- Returns:
- Map of extension items, or null if none
- Since:
- JavaMail 1.4.6
-