Class FetchResponse


public class FetchResponse extends IMAPResponse
This class represents a FETCH response obtained from the input stream of an IMAP server.
  • Constructor Details

  • Method Details

    • getItemCount

      public int getItemCount()
    • getItem

      public Item getItem(int index)
    • getItem

      public <T extends Item> T getItem(Class<T> c)
    • getItem

      public static <T extends Item> T getItem(Response[] r, int msgno, 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> List<T> getItems(Response[] r, int msgno, 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 Map<String,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