Last active
June 4, 2016 07:22
-
-
Save slawekradzyminski/0fc1cdceaf4dd83970d21504160734b5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File downloadFile() throws Exception { | |
File downloadedFile = File.createTempFile("download", ".tmp"); | |
HttpResponse fileToDownload = getHttpResponse(); | |
FileUtils.copyInputStreamToFile(fileToDownload.getEntity().getContent(), downloadedFile); | |
return downloadedFile; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment