Hi, i'd like to ask how can I save the pdf file being sent from an HttpUrlConnection to a file?
Im using an HttpURLConnection to call a report from ms sql server report server. This should return a pdf file.
Then upon checking the getInputStream(), and writing the stream as
string, I can tell that the contents are the pdf file itself(although it prints out probably hex values).
Normally, if it is run in a web application, it displays the pdf automatically.
But im running the code in a desktop environment (probably command line only). So what i need is to get the inputstream of the httpurlconnection, and save it to its PDF file.
Other approach is welcomed also... thank you!