As I have <a:commandLink> onclick of this i am calling function which has above code. So onclick of that link a popup should come to download that content.
We can't help you unless you tell us what is wrong or error messages you are seeing. Can you provide more detail? One thing I suspect you will run into is that the request requires authentication, so you will need to set auth headers to make that get call.
Also, have you considered using OpenCMIS to retrieve the content? Then you wouldn't have to deal with raw HTTP requests.