hi ,
im extracting the attachments using the following code,
...
List Attachments = result.getAttachments();
//Create an Iterator object and iterate through
//the List object
System.out.println("before check of attachments");
Iterator iter = Attachments.iterator();
int i = 0 ;
while (iter.hasNext()) {
//String fileName=Attachments.listIterator(0).toString();
//System.out.println("filename"+fileName);
Document file = (Document)iter.next();
file.copyToFile(new File("D:\\temp\\attachments"+i+""));
i++;
..
the attachments are of type, pdf, text ,jpeg etc... so how should i save the attachments to the drive. kindly help as im very new to this.