java.io.IOException: Server returned HTTP response code: 416 for URL: http://localhost:8080/report/b.rar
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1243)at webt.mtd.FileSplitterFetch.run(FileSplitterFetch.java:47)
HTTP response code: 416是由于读取文件时设置的Range有误造成的,具体的说就是下面这行代码有误:
httpConnection.setRequestProperty("RANGE", "bytes=1024-");
这个RANGE显然不能超出文件的size