Module jakarta.mail

Class FetchResponse


  • public class FetchResponse
    extends IMAPResponse
    This class represents a FETCH response obtained from the input stream of an IMAP server.
    Author:
    John Mani, Bill Shannon
    • Method Detail

      • getItemCount

        public int getItemCount()
      • getItem

        public Item getItem​(int index)
      • getItem

        public <T extends Item> T getItem​(java.lang.Class<T> c)
      • getItem

        public static <T extends Item> T getItem​(Response[] r,
                                                 int msgno,
                                                 java.lang.Class<T> c)
        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 responses
        msgno - the message number
        c - the class
        Returns:
        the fetch item
      • getItems

        public static <T extends Item> java.util.List<T> getItems​(Response[] r,
                                                                  int msgno,
                                                                  java.lang.Class<T> c)
        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 responses
        msgno - the message number
        c - the class
        Returns:
        the list of fetch items
        Since:
        JavaMail 1.5.2
      • getExtensionItems

        public java.util.Map<java.lang.String,​java.lang.Object> 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