从日历项检索附件

Aspose.Email - 从日历项检索附件

Aspose.Email 提供了一个附件集合,可用于检索与日历项关联的附件。

Java


 String savedFile = dataDir + "AppWithAttachments.ics";

Appointment app2 = Appointment.load(savedFile);

System.out.println("Total Attachments: "  + app2.getAttachments().size());

for (int i=0; i< app2.getAttachments().size();i++)

{

	Attachment att = app2.getAttachments().get_Item(i);

	System.out.println(att.getName());

	//Save the attachment to disc

	att.save(att.getName());

}

下载运行代码

下载示例代码