This topic is written for OSS SDK for Java V3.10.2.

Compatibility

Version compatibility of OSS SDK for Java:

  • For OSS SDKs V3. ×. ×:
    • API: compatible
    • Namespace: compatible
  • For OSS SDKs V2. ×. ×:
    • API operation: compatible
    • Namespace: compatible
  • For OSS SDKs V1.0. ×:
    • API operation: compatible
    • Namespace: incompatible. The code for Tablestore in OSS SDK V1.0.x is removed from V2.0.0 and the package names com.aliyun.openservices. * and com.aliyun.openservices.oss. * are replaced with com.aliyun.oss. *.

SDK source code and API documents

For more information about SDK source code, visit GitHub. For more information, visit Aliyun OSS SDK for Java 3.10.2 API.

Example

OSS SDK for Java provides a variety of sample code for you to reference or use. The following table lists the sample code.

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-64
SimpleGetObjectSample.java Download objects
DownloadSample.java Resumable download
ObjectMetaSample.java Manage object metadata
ListObjectsSample.java List objects
UploadPartCopySample.java Copy objects
DeleteObjectsSample.java Delete objects
BucketOperationsSample.java Configure authorized access, lifecycle rules, Set logging, hotlink protection, and CORS for a bucket.
ImageSample.java Image Processing
PostObjectSample.java Use PostObject for form upload. The implementation of form upload is independent of OSS SDK for Java.
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 pay-by-requester mode
EncryptionClientRsaSample.java and EncryptionClientKmsSample.java Client-side encryption