Search in sources :

Example 6 with MAPIValue

use of net.freeutils.tnef.MAPIValue in project zm-mailbox by Zimbra.

the class MapiPropertyId method getDateValue.

public Date getDateValue(SchedulingViewOfTnef schedView) throws IOException {
    MAPIValue mpValue = getFirstValue(schedView);
    if (mpValue == null) {
        return null;
    }
    Object obj = mpValue.getValue();
    if (obj == null) {
        return null;
    }
    if (obj instanceof Date) {
        return (Date) obj;
    }
    return null;
}
Also used : MAPIValue(net.freeutils.tnef.MAPIValue) Date(java.util.Date)

Example 7 with MAPIValue

use of net.freeutils.tnef.MAPIValue in project zm-mailbox by Zimbra.

the class SchedulingViewOfTnef method getCategories.

/**
     * @return value of PidNameKeywords property or null if absent
     * @throws IOException
     */
public List<String> getCategories() throws IOException {
    MAPIValue[] values = MapiPropertyId.PidNameKeywords.getValues(this);
    if (values == null) {
        return null;
    }
    ArrayList<String> categories = new ArrayList<String>();
    for (MAPIValue val : values) {
        categories.add(val.toString());
    }
    return categories;
}
Also used : ArrayList(java.util.ArrayList) MAPIValue(net.freeutils.tnef.MAPIValue)

Aggregations

MAPIValue (net.freeutils.tnef.MAPIValue)7 RawInputStream (net.freeutils.tnef.RawInputStream)2 ArrayList (java.util.ArrayList)1 Date (java.util.Date)1