【10月28日】OSS存储服务升级公告。API文档及SDK开发包已更新
全面部分都ok,可是
PutObjectFromFile
!!!初始变量
static String upFilePath = 'g:/alidata/updata/up.rar';
static String downFilePath = 'g:/alidata/downdata/down.rar';
static String bucket = accessKeyId.toLowerCase() +'-test-buchet';
static String object = accessKeyId.toLowerCase() + '-test-object';
static String group = accessKeyId.toLowerCase() + '-test-group';
----- GettObjectWithIfMatch ------
Success
----- GetObjectInputStream ------
OSS Sample
----- GetObjectInputStreamWithRange ------
Date:Mon, 21 Nov 2011 08:05:56 GMT
Server:AliyunOSS
x-oss-request-id:2a5bd7f2-6698-e261-387c-f2877a6c7b52
Last-Modified:Mon, 21 Nov 2011 08:05:56 GMT
ETag:'9BF156C2C16BB90B9EC81C96FE37EF1B'
Connection:close
Accept-Ranges:bytes
Content-Range:bytes 0-5/10
Content-Length:6
Content-Type:text/plain
OSS Sa
----- PutObjectWithUserMeta------
Success
----- GetObjectMeta -----
x-oss-request-id:5a4cc6b4-645c-8bc4-2b83-f8b95b63a452
ETag:'9BF156C2C16BB90B9EC81C96FE37EF1B'
Date:Mon, 21 Nov 2011 08:06:19 GMT
Content-Length:10
Last-Modified:Mon, 21 Nov 2011 08:06:16 GMT
x-oss-meta-id:123
Content-Type:text/plain
Connection:close
Server:AliyunOSS
----- IsObjectExists -----
true
----- PutObjectFromFile -----
2011-11-21 16:23:11 org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
信息: I/O exception (java.net.SocketException) caught when processing request: Software caused connection abort: socket write error
2011-11-21 16:23:11 org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
信息: Retrying request
Exception in thread 'main' org.apache.commons.httpclient.ProtocolException: Unbuffered entity enclosing request can not be repeated.
at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:487)
at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2114)
at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
at com.aliyun.oss.api.OSSClient.execute(OSSClient.java:130)
at com.aliyun.oss.api.OSSClient.request(OSSClient.java:168)
at com.aliyun.oss.api.OSSClient.objectOperation(OSSClient.java:206)
at com.aliyun.oss.api.OSSClient.putObjectFromInputStream(OSSClient.java:829)
at com.aliyun.oss.api.OSSClient.putObjectFromFile(OSSClient.java:775)
at com.aliyun.oss.api.OSSClient.putObjectFromFile(OSSClient.java:745)
at OssSample.main(OssSample.java:219)
赞0
踩0