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.

Nested Class Summary

static class
FetchProfile.Item
Inner class that defines sets of headers that are commonly bundled together in a FetchProfile.

Method Summary

void
add(String header)
Add a specific header.
void
add(FetchProfile.Item item)
Add a predefined profile of headers.
boolean
contains(String header)
Determine if the specified header is already included.
boolean
contains(FetchProfile.Item item)
Determine if the given profile item is already included.
String[]
getHeaderNames()
Get the headers that have already been included.
FetchProfile.Item[]
getItems()
Get the profile items already included.

Method Details

add

public void add(String header)
Add a specific header.
Parameters:
header - the header whose value should be prefetched

add

public void add(FetchProfile.Item item)
Add a predefined profile of headers.
Parameters:
item - the profile to add

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

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

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