Name

FetchProfile

Synopsis

FetchProfile objects allows programs to prefetch certain attributes for sets of messages (using the fetch() method of Folder). This allows optimized retrieval of particular message data, such as recipients, senders and subjects. Content that is not included in the FetchProfile will still be accessible, but will be retrieved as it is requested by the user via the various get methods of the message object.

The add() method accepts a header name, or a FetchProfile.Item object, which defines a set of headers to retrieve.

public class FetchProfile {
// Public Constructors
   public FetchProfile();  
// Inner Classes
   public static class Item; 
// Public Instance Methods
   public void add( String headerName);  
   public void add( FetchProfile.Item item);  
   public boolean contains( String headerName);  
   public boolean contains( FetchProfile.Item item);  
   public String[] getHeaderNames();  
   public FetchProfile.Item[] getItems();  
}

Passed To

Folder.fetch()

Get Java Enterprise in a Nutshell, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.