1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
// PDF文件下载
String[] allowedContentTypes =
new
String[] {
"application/pdf"
,
"image/png"
,
"image/jpeg"
};
HttpUtil.get(url, params,
new
BinaryHttpResponseHandler(
allowedContentTypes) {
@Override
public
void
onSuccess(
byte
[] binaryData) {
super
.onSuccess(binaryData);
Log.i(
"-----pdf onSuccess-------"
, binaryData.toString());
}
@Override
public
void
onFailure(Throwable error, String content) {
super
.onFailure(error, content);
Log.i(
"-----pdf error-------"
, content);
}
});
|