Example usage for javax.mail FetchProfile getItems

List of usage examples for javax.mail FetchProfile getItems

Introduction

In this page you can find the example usage for javax.mail FetchProfile getItems.

Prototype

public Item[] getItems() 

Source Link

Document

Get the items set in this profile.

Usage

From source file:com.hs.mail.imap.message.response.FetchResponseBuilder.java

private BodyFetchItem getBodyFetchItem(FetchProfile fp) {
    FetchProfile.Item[] items = fp.getItems();
    BodyFetchItem result = null;/*from w  ww . j  ava  2s . com*/
    if (!ArrayUtils.isEmpty(items)) {
        for (int i = 0; i < items.length; i++) {
            if (items[i] instanceof BodyFetchItem) {
                result = (BodyFetchItem) items[i];
                break;
            }
        }
    }
    return result;
}