עבודה עם IBM Notes

About IBM Notes

IBM Notes הוא הלקוח ו‑IBM Domino הוא השרת של פלטפורמת תוכנה משותפת מסוג client‑server. IBM Notes מספקת תכונות שיתוף פעולה כגון דוא"ל, יומנים, רשימות משימות, ניהול אנשי קשר ועוד. קובץ המסד נתונים שבו משתמש IBM Notes נשמר בפורמט Notes Storage Facility (NSF).

זיהוי קובץ בפורמט NSF

קטע הקוד שלמטה יראה לך כיצד לזהות את פורמט הקובץ NSF:

// Returns FileFormatType.Nsf for an NSF storage file
int formatType = FileFormatUtil.detectFileFormat("storage.nsf").getFileFormatType();

if (formatType == FileFormatType.Nsf) {
    System.out.println("The file is in the NSF format.");
}

Read messages from NSF storage file

Aspose.Email מספקת את NotesStorageFacility class לקריאת קובצי אחסון NSF. ה‑ NotesStorageFacility class מספקת את EnumerateMessages method שמופעל על כל ההודעות בקובץ האחסון NSF. קוד לדוגמה הבא מציג את השימוש ב‑ NotesStorageFacility class ו‑ EnumerateMessages method לקריאת הודעות מקובץ האחסון NSF.

// For complete examples and data files, please go to https://github.com/aspose-email/Aspose.Email-for-Java
// The path to the resource directory.
String dataDir = "data/";

NotesStorageFacility nsf = new NotesStorageFacility(dataDir + "SampleNSF.nsf");
try {
    for (MailMessage eml : nsf.enumerateMessages()) {
        System.out.println(eml.getSubject());
    }
} finally {
    nsf.dispose();
}