{"action":"closed","issue":{"url":"https://api.github.com/repos/wyouflf/xUtils3/issues/248","repository_url":"https://api.github.com/repos/wyouflf/xUtils3","labels_url":"https://api.github.com/repos/wyouflf/xUtils3/issues/248/labels{/name}","comments_url":"https://api.github.com/repos/wyouflf/xUtils3/issues/248/comments","events_url":"https://api.github.com/repos/wyouflf/xUtils3/issues/248/events","html_url":"https://github.com/wyouflf/xUtils3/issues/248","id":144488689,"number":248,"title":"断点续传进度问题99%","user":{"login":"myqhit","id":2512795,"avatar_url":"https://avatars.githubusercontent.com/u/2512795?v=3","gravatar_id":"","url":"https://api.github.com/users/myqhit","html_url":"https://github.com/myqhit","followers_url":"https://api.github.com/users/myqhit/followers","following_url":"https://api.github.com/users/myqhit/following{/other_user}","gists_url":"https://api.github.com/users/myqhit/gists{/gist_id}","starred_url":"https://api.github.com/users/myqhit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/myqhit/subscriptions","organizations_url":"https://api.github.com/users/myqhit/orgs","repos_url":"https://api.github.com/users/myqhit/repos","events_url":"https://api.github.com/users/myqhit/events{/privacy}","received_events_url":"https://api.github.com/users/myqhit/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-30T07:34:48Z","updated_at":"2016-04-01T17:11:59Z","closed_at":"2016-04-01T17:11:59Z","body":"断点续传暂停后下一次请求的后续的数据会多请求CHECK_SIZE个字节，\r\n在匹配是否是同一个文件后，真正写入文件的字节数应该减去CHECK_SIZE，否则后面的total计算有误，始终比真实文件大CHECK_SIZE个字节。\r\n建议修改：\r\n     byte[] fileCheckBuffer = IOUtil.readBytes(fis, filePos, CHECK_SIZE);\r\n     byte[] checkBuffer = IOUtil.readBytes(in, 0, CHECK_SIZE);\r\n     contentLength=contentLength-CHECK_SIZE; //在这里加这一行，保证文件大小计算一致。"}}