2013-06-
Lead:Recently, we are developing new software and using the BAE cloud service, which has encountered various problems in cloud storage.
Body: I use the Java SDK. If the upload method is described in sample. Java in the SDK, but there is no download method, which makes me confused. Three interfaces are available:
Baidubcsresponse <downloadobject> GetObject (getobjectrequest) downloads an object. Baidubcsresponse <downloadobject> GetObject (getobjectrequest, java. Io. File destfile) downloads an object. Baidubcsresponse <downloadobject> GetObject (Java. Lang. String bucket, java. Lang. String object) to download the object.
These three methods are different in use.
Method 1 and 3:
I used this at the beginning. The downloaded files (audio/images) are different from those uploaded.
In this way, you can get the inputstream and save it by yourself. This is very problematic and the content is different. Who knows why.
Method 2:
In this case, you can directly Save the downloaded file to the specified location. OK, no problem. The magic of Baidu, long live du Niang.
Use Java SDK, in Android development, as long as a bcs-sdk-java_xxx.jar can be. In other cases, you need to add the packages (in the SDK). Otherwise, an error is reported.
Above!
End: 1) insist on writing a blog
2) Continue Learning Development
3) I am an IT programmer