Thank you @merefield for your guidance,
But I would like to know that, is there any possibility to download the topic/category from UI itself, instead of doing all this thing in server end.
This could be more helpful for me if there is any way to achieve this.