カレンダー項目から添付ファイルを取得する

Aspose.Email - カレンダーアイテムから添付ファイルを取得

Aspose.Email は、カレンダーアイテムに関連付けられた添付ファイルを取得できる attachments コレクションを提供します。

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());
}

実行コードをダウンロード

サンプルコードをダウンロード