HttpResponse.download(OutputStream) #81
Labels
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: feature request
‘Nice-to-have’ improvement, new feature or different behavior or design.
From yan...@google.com on April 07, 2012 05:34:29
External references, such as a standards document, or specification? http://stackoverflow.com/questions/9941378/how-to-download-a-large-file-using-google-api-java-client-on-android http://javadoc.google-http-java-client.googlecode.com/hg/1.8.3-beta/com/google/api/client/http/HttpResponse.html Java environments (e.g. Java 6, Android 2.3, App Engine, or All)? All Please describe the feature requested. Here's an idea: suppose you want to just download the content of a response into a file, e.g. if you are downloading an image. A good way to do it is to use AbstractInputStreamContent.copy as in this example:
Unfortunately, AbstractInputStreamContent.copy is hard to discover. Perhaps we can make it easier to find by adding an HttpResponse.download(OutputStream) method, so now the last 2 lines would now be:
We could also potentially add something similar in JsonHttpRequest and JsonHttpClient.
Original issue: http://code.google.com/p/google-http-java-client/issues/detail?id=81
The text was updated successfully, but these errors were encountered: