This topic is written for the OSS Java SDK V3.5.0.

Compatibility

  • For SDKs V3. ×. ×:
    • API: compatible
    • Namespace: compatible
  • For SDKs V2. ×. ×:
    • API: compatible
    • Namespace: compatible
  • For SDKs V1.0. ×:
    • API: compatible
    • Namespace: incompatible. The Table Store code in version 1.0.x is removed from version 2.0.0. The package names com.aliyun.openservices. * and com.aliyun.openservices.oss. * are replaced with com.aliyun.oss. *.

SDK source code and API documents

For the source code of the OSS Java SDK, visit GitHub. For more information, see OSS Java SDK API documents.

Sample code

The OSS Java SDK provides a variety of sample code for your reference or use. The following table describes the sample code provided.

Sample file Content
GetStartedSample.java Quick start
CreateFolderSample.java Create a folder for Simple upload
AppendObjectSample.java Append upload
UploadSample.java Resumable upload
MultipartUploadSample.java Multipart upload
GetProgressSample.java Upload progress bars
CallbackSample.java Upload callback
CRCSample.java CRC for object upload
SimpleGetObjectSample.java Overview
DownloadSample.java Resumable download
ObjectMetaSample.java Manage Object Meta
ListObjectsSample.java List objects
UploadPartCopySample.java Copy objects
DeleteObjectsSample.java Delete objects
BucketOperationsSample.java Manage ACL for an object, Manage lifecycle rules, and configure Access logging, Hotlink protection, and CORS for a bucket
ImageSample.java Image processing
PostObjectSample.java PostObject in a specified bucket. The implementation is independent of Java SDK.
ConcurrentGetObjectSample.java Download multiple objects at the same time. We recommend that you use Resumable download.
TrafficLimitSample.java Configure Single-connection bandwidth throttling
SetRequestPaymentSample.java Enable the Enable pay-by-requester mode