javax.mail
Class FetchProfile
public class FetchProfile
extends java.lang.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
.
static class | FetchProfile.Item - Inner class that defines sets of headers that are commonly bundled together
in a FetchProfile.
|
add
public void add(String header)
Add a specific header.
header
- the header whose value should be prefetched
add
public void add(FetchProfile.Item item)
Add a predefined profile of headers.
item
- the profile to add
contains
public boolean contains(String header)
Determine if the specified header is already included.
header
- the header to check for
- true if the header is already included
contains
public boolean contains(FetchProfile.Item item)
Determine if the given profile item is already included.
item
- the profile to check for
- true if the profile item is already included
getHeaderNames
public String[] getHeaderNames()
Get the headers that have already been included.
- the headers already added to this profile
getItems
public FetchProfile.Item[] getItems()
Get the profile items already included.
- the items already added to this profile