Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
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.