Problem solved by adding the following:
blobDomain.closeInputStream();
blobDomain.closeOutputStream();
at the end of try
block before the last statement facesContext.responseComplete();
Minor Change:
I was getting the outputstream
by this line: outputStream = response.getOutputStream();
Instead I should use the outputstream
that's come with method as an argument:
public void downloadSelectedFile(FacesContext facesContext, OutputStream outputStream)