This document is written based on OSS Java SDK 2.8.3.

Compatibility

  • For SDK versions 2.x.x:
    • API: compatible
    • Namespace: compatible
  • For SDK versions 1.0.x:
    • 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 OSS Java SDK, see GitHub. For more information, see OSS Java SDK API documents.

Code samples

OSS SDK for Java provides a variety of code samples for your reference. The following table describes the content of code samples.

Sample file Content
GetStartedSample.java Quick start
CreateFolderSample.java Create a folder in 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 file upload
SimpleGetObjectSample.java Download objects
DownloadSample.java Resumable download
ObjectMetaSample.java Manage Object Meta
ListObjectsSample.java List objects
UploadPartCopySample.java Copy objects
DeleteObjectsSample.java Delete objects
BucketOperationsSample.java Bucket configurations such as authorized access, lifecycle management, access log files, anti-leech, and CORS.
ImageSample.java Image processing
PostObjectSample.java PostObject is independent of Java SDK.
ConcurrentGetObjectSample.java Download multiple objects at the same time. Resumable downloads are recommended.