Hi Pradeep,
Based on what I read in this discussion I think MDM can send csv or xml to a port.
And from here you wish to pick file and carry out further activity using Java APIs.
Although this can be achieved using Java APIs but you may want to weigh it by using UNIX as suggested as it could be simpler that way.Please go through these links -
http://www.unix.com/shell-programming-scripting/157326-mail-csv-file-excel-sheet.html
http://search.cpan.org/~jmcnamara/Spreadsheet-WriteExcel/
The above forum can also help with some resources for this code.
Thanks,
Ravi