OSS通过javaAPI分段下载的这个异常怎么解决啊?
ReOSS通过javaAPI分段下载的这个异常怎么解决啊?
今天直接用了HttpURLConnection,一旦设置了Range,也是异常
我是这样写的 setRequestProperty('Range', 'bytes=0-100')
异常是
java.net.SocketException: Software caused connection abort: recv failed
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:258)
at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:695)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:640)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:660)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1195)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:379)
-------------------------
ReOSS通过javaAPI分段下载的这个异常怎么解决啊?
这个 因为我是写个testcase,所以用的文件我知道不会整除的,就忽略细节了
content.read() 是写错了,不过这些都在出异常的位置之后,应该不会有影响的
赞0
踩0