public static void writeDocument(Document doc,String filename){
  writeDocument(doc,filename,false);
}

public static void writeDocument ( Document doc , String filename ) { writeDocument ( doc , filename , false ) ; }
writes a document to a file .
