download zip file using java?

前端 未结 6 1430
鱼传尺愫
鱼传尺愫 2021-02-15 12:13

I am downloading zip file from web server using Java but somehow I am loosing about 2kb in each file. I don\'t know why since same code works fine with other formats, e.g, text,

6条回答
  •  执念已碎
    2021-02-15 12:39

    Put an out.flush() just after the " while ((count = in.read(b)) > 0) {...}" section and before the out.close().

提交回复
热议问题