我有一个mbox文件https://pastebin.com/mGq0gB8S,带有base64编码的附件。我想使用Apache Tika Mbox parser获得附件。我的代码在这里:
TypeDetector typeDetector = new TypeDetector();
Parser autoDetectParser = new AutoDetectParser(typeDetector);
ParseContext recursingContext = new ParseContext();
recursingContext.set(Parser.class, autoDetectParser);
mboxParser = new MboxParser();
mboxParser.setTracking(true);
ContentHandler handler = new BodyContentHandler(); // do I need another handler? but which? or what?
Metadata metadata = new Metadata();
InputStream stream = getISByPath(path);
mboxParser.parse(stream, handler, metadata, recursingContext);
System.out.println(handler.toString()); // here I want to see a base64 code of an encoded image
如何从mbox主体获取base64编码的图像?