package com.workfusion.odf.impl.converter.extractor.mail;

import java.io.InputStream;

import org.slf4j.Logger;

import com.workfusion.odf.service.mail.entity.EmailMessage;
import com.workfusion.odf.service.mail.util.EmailParsingUtils;

public class RecursiveEmlExtractor extends AbstractMailExtractor {
    public static final String EML = "eml";
    private static final String MAIL_SUFFIXES[] = {EML};

    /**
     * Constructor.
     *
     * @param logger
     */
    public RecursiveEmlExtractor(final Logger logger) {
    	super(logger);
    }

    @Override
    public String[] getExtensions() {
        return MAIL_SUFFIXES;
    }

    @Override
    protected EmailMessage parseMessage(final InputStream contentIS, final String extension) {
        return EmailParsingUtils.parseEmlFile(contentIS, extension);
    }
}
