public void operate(FlowProcess process, FunctionCall<NullContext> functionCall) {
init();
// On input we have a FetchedDatum that holds a single email.
TupleEntry arguments = functionCall.getArguments();
FetchedDatum fetchedDatum = new FetchedDatum(arguments.getTuple());
// Now, if the FetchedDatum mime-type is application/mbox, we want to parse it and
// output the results
if (fetchedDatum.getContentType().equals("application/mbox")) {
Metadata metadata = new Metadata();
ParseContext context = new ParseContext();
InputStream is = new ByteArrayInputStream(fetchedDatum.getContentBytes());
try {
_parser.parse(is, _handler, metadata, context);
// _content now has all of the body text, and metadata has the header info.