javax.mail

Class FetchProfile

public class FetchProfile extends Object

A FetchProfile defines a list of message attributes that a client wishes to prefetch from the server during a fetch operation. Clients can either specify individual headers, or can reference common profiles as defined by FetchProfile.Item.
Nested Class Summary
static classFetchProfile.Item
Inner class that defines sets of headers that are commonly bundled together in a FetchProfile.
Method Summary
voidadd(FetchProfile.Item item)
Add a predefined profile of headers.
voidadd(String header)
Add a specific header.
booleancontains(FetchProfile.Item item)
Determine if the given profile item is already included.
booleancontains(String header)
Determine if the specified header is already included.
String[]getHeaderNames()
Get the headers that have already been included.
FetchProfile.Item[]getItems()
Get the profile items already included.

Method Detail

add

public void add(FetchProfile.Item item)
Add a predefined profile of headers.

Parameters: item the profile to add

add

public void add(String header)
Add a specific header.

Parameters: header the header whose value should be prefetched

contains

public boolean contains(FetchProfile.Item item)
Determine if the given profile item is already included.

Parameters: item the profile to check for

Returns: true if the profile item is already included

contains

public boolean contains(String header)
Determine if the specified header is already included.

Parameters: header the header to check for

Returns: true if the header is already included

getHeaderNames

public String[] getHeaderNames()
Get the headers that have already been included.

Returns: the headers already added to this profile

getItems

public FetchProfile.Item[] getItems()
Get the profile items already included.

Returns: the items already added to this profile