Steps followed :
Took a back of my lotus notes as sample.nsf
And then tried to read the attachments from the sample.nsf
Code snippet :
Database db = session.getDatabase("",`enter code here`"C:\\Projects\\NotesToJava\\sample.nsf");
DocumentCollection dc = db.getAllDocuments();
Document ...