FileDownloader
FileDownloader copied to clipboard
下载xml中文乱码问题
源码
FileDownloader.getImpl().create("http://comment.bilibili.com/"+cid+".xml")
.setPath(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM).getAbsolutePath() + "/" + cid + ".xml")
.setListener(new FileDownloadListener() {
@Override
protected void pending(BaseDownloadTask task, int soFarBytes, int totalBytes) {
}
@Override
protected void connected(BaseDownloadTask task, String etag, boolean isContinue, int soFarBytes, int totalBytes) {
}
@Override
protected void progress(BaseDownloadTask task, int soFarBytes, int totalBytes) {
}
@Override
protected void blockComplete(BaseDownloadTask task) {
}
@Override
protected void retry(final BaseDownloadTask task, final Throwable ex, final int retryingTimes, final int soFarBytes) {
}
@Override
protected void completed(BaseDownloadTask task) {
mElasticDownloadView.success();
}
@Override
protected void paused(BaseDownloadTask task, int soFarBytes, int totalBytes) {
}
@Override
protected void error(BaseDownloadTask task, Throwable e) {
mElasticDownloadView.fail();
}
@Override
protected void warn(BaseDownloadTask task) {
}
}).start();
不知道为什么,我换好多种办法都无法解决中文乱码的问题 能告诉我怎么解决吗