请告诉我如何设置下载文件的保存路径。
例如:
AsyncHttpClient client = new AsyncHttpClient();
String[] allowedTypes = new String[] { "image/png" };
client.get("http://www.example.com/image.png", new BinaryHttpResponseHandler(allowedTypes) {
@Override
public void onSuccess(byte[] imageData) {
// Successfully got a response
}
@Override
public void onFailure(Throwable e, byte[] imageData) {
// Response failed :(
}
});