Back to project page android-rest-client.
The source code is released under:
Apache License
If you think the Android project android-rest-client listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.dg.libs.rest.parsers; // w w w . j av a2s .c o m import org.apache.commons.io.IOUtils; import java.io.File; import java.io.FileOutputStream; import java.io.InputStream; public abstract class FileHttpResponseParser implements HttpResponseParser<File> { private File outputFile; public FileHttpResponseParser(File outputFile) { super(); this.outputFile = outputFile; } @Override public File parse(final InputStream responseStream) throws Exception { FileOutputStream outputStream = new FileOutputStream(outputFile); IOUtils.copy(responseStream, outputStream); return outputFile; } }