美文网首页Android网络编程
OKHttp源码(十一):感谢

OKHttp源码(十一):感谢

作者: 隔壁老李头 | 来源:发表于2017-06-04 12:45 被阅读636次

特别感谢
http://www.cnblogs.com/etoah/p/5891285.html
https://quafoo.gitbooks.io/http2-rfc7540-zh-cn-en/chapter3/section3.5.html
http://www.jianshu.com/p/498dd6c38048
http://www.tuicool.com/articles/ERFJni
http://blog.csdn.net/whuslei/article/details/6667471/
http://www.mamicode.com/info-detail-1199706.html
http://www.cnblogs.com/Leo_wl/p/5763001.html
http://www.jellythink.com/archives/705
http://www.cnblogs.com/tiwlin/archive/2011/12/25/2301305.html
http://blog.csdn.net/lmj623565791/article/details/48129405
http://www.cnblogs.com/Jonecmnn/p/6403858.html
http://www.wxtlife.com/2016/03/27/%E8%AF%A6%E8%A7%A3https%E6%98%AF%E5%A6%82%E4%BD%95%E7%A1%AE%E4%BF%9D%E5%AE%89%E5%85%A8%E7%9A%84%EF%BC%9F/
http://www.cnblogs.com/wjlog/p/5827168.html
http://www.jianshu.com/p/55e402bcbc18
http://www.guokr.com/post/114121/
http://honglu.me/2016/01/13/HTTPS%E8%AF%A6%E8%A7%A3/
http://www.2cto.com/kf/201405/299494.html
http://blog.csdn.net/jackieliulixi/article/details/36480895
http://www.tuicool.com/articles/rq2I7zE
http://blog.csdn.net/zhangxinrun/article/details/5941051
https://www.zhihu.com/question/21955083
http://kb.cnblogs.com/page/197396/
http://www.jianshu.com/p/71b3c4f0762c
http://www.jianshu.com/p/1429b12a5519
http://www.jianshu.com/p/33feb2fadb15
http://blog.csdn.net/adrian169/article/details/9164385
http://velocity.oreilly.com.cn/2015/ppts/lizhenyu.pdf
http://www.cnblogs.com/xiaohuochai/p/6180941.html
http://www.itdadao.com/articles/c15a334975p0.html
http://www.jianshu.com/p/e6fccf55ca01
http://www.jianshu.com/p/5c98999bc34f
http://www.jianshu.com/p/a2fcf1dad6b5
http://www.jianshu.com/p/9a8283171de4
http://www.jianshu.com/p/671a123ec163
http://www.jianshu.com/p/35476796dd54
http://blog.csdn.net/itachi85/article/details/51190687
http://blog.csdn.net/itachi85/article/details/52036684
http://www.jianshu.com/p/92a61357164b
http://lowett.com/2017/03/21/okhttp-7/
http://lowett.com/2017/02/24/okhttp-4/
http://blog.csdn.net/p892848153/article/details/51214054
http://wingjay.com/2016/07/21/%E5%B8%A6%E4%BD%A0%E5%AD%A6%E5%BC%80%E6%BA%90%E9%A1%B9%E7%9B%AE%EF%BC%9AOkHttp-%E8%87%AA%E5%B7%B1%E5%8A%A8%E6%89%8B%E5%AE%9E%E7%8E%B0okhttp/
http://www.jianshu.com/p/aad5aacd79bf
http://www.jcodecraeer.com/a/anzhuokaifa/androidkaifa/2015/0326/2643.html
http://www.baitouwei.com/2015/01/08/okio/
http://blog.csdn.net/zhyooo123/article/details/50536781
http://blog.csdn.net/zoudifei/article/details/51232711
http://blog.csdn.net/yudajun/article/details/52857176
http://www.jianshu.com/p/a3334b931ae4
https://juejin.im/entry/580ec75ba0bb9f0061cebba6
http://www.jianshu.com/p/f033a64539a1
http://www.jianshu.com/p/e0520fb19b4e
http://www.jianshu.com/p/a42170233a32
http://www.jianshu.com/p/3af806782a01
http://blog.csdn.net/evan_man/article/details/51204469
http://www.jianshu.com/p/ccf24a63dca8
http://www.bijishequ.com/detail/95119?p=
http://blog.csdn.net/new_abc/article/details/53010267
http://hpw123.win/2016/12/29/Okhttp%E6%BA%90%E7%A0%81%E5%AD%A6%E4%B9%A0%E5%9B%9B/
http://www.cnblogs.com/chenqf/p/6386163.html
http://www.cnblogs.com/zemliu/p/4263048.html
http://www.jianshu.com/p/9cebbbd0eeab
https://github.com/fyhertz/libstreaming
http://www.jianshu.com/p/8f1642572aef
https://juejin.im/entry/58dc7560da2f60005fb5a919
http://www.jianshu.com/p/92ce01caa8f0
http://blog.csdn.net/qq_31694651/article/details/52748134
其中还有一些文章,最开始看过的,后面实在是找不到了,感谢那些曾经帮助过我的那些文章。

相关文章

网友评论

  • flovm:楼主写的实在是太详细了,请问关于网络这一块可不可以推荐几本书或者学习的网站呢?先感谢一下:smile:
  • Honalee:楼主,你这篇应该是我目前看到的关于okhttp最全的一篇讲解了,博采众长,也有自己独有的内容和见解。学习了。
    暴走的Jacky:@Honalee 你拿到的是inputStream,也需要读取流中的数据到本地文件吧,如is.read()方法就是读取流啊,这就是下载过程啊
    Honalee:博主,我有个关于okhttp取下载进度的问题。看到网上有部分是通过在CallBack的onResponse回调里对拿到的Response边读 IO边计算进度,类似这种:public void onResponse(Call call, Response response) throws IOException {
    InputStream is = null;
    byte[] buf = new byte[2048];
    int len = 0;
    FileOutputStream fos = null;
    // 储存下载文件的目录
    File dir = new File(destFileDir);
    if (!dir.exists()) {
    dir.mkdirs();
    }
    File file = new File(dir, destFileName);
    try {
    is = response.body().byteStream();
    long total = response.body().contentLength();
    fos = new FileOutputStream(file);
    long sum = 0;
    while ((len = is.read(buf)) != -1) {
    fos.write(buf, 0, len);
    sum += len;
    int progress = (int) (sum * 1.0f / total * 100);
    // 下载中更新进度条
    listener.onDownloading(progress);
    }
    fos.flush();
    // 下载完成
    listener.onDownloadSuccess(file);
    } catch (Exception e) {
    listener.onDownloadFailed(e);
    } finally {
    try {
    if (is != null)
    is.close();
    } catch (IOException e) {
    }
    try {
    if (fos != null)
    fos.close();
    } catch (IOException e) {
    }
    }
    }
    });
    这种都拿到Response了再去计算进度,应该和下载本身不搭嘎了吧,它计算的应该是文件写入的速度吧?不知道博主怎么看,另外关于取下载进度你有办法吗?
    隔壁老李头:@Honalee 谢谢
  • b757ff66ad79:牛逼,看了你的源码解析大全套,配合着源码再阅读一遍,认识更加深刻了,谢谢。您也可以再发一下掘金之类的程序员聚集地,让大家更多的学习到
    隔壁老李头:谢谢!目前工作还有点忙,由于精力有限,所以先把简书搞定,等后期空了,再上掘金。

本文标题:OKHttp源码(十一):感谢

本文链接:https://www.haomeiwen.com/subject/efshfxtx.html