edit-icon download-icon

Preface

Last Updated: Aug 14, 2018

This document is written based on OSS Java SDK 2.8.3.

Prerequisites

JDK versions 6 or later

Compatibility

  • For SDK series of 2.x.x

    • API: compatible
    • Namespace: compatible
  • For SDK series of 1.0.x

    • API: compatible
    • Namespace: incompatible. In version 2.0, the Table Store code in version 1.0.x is removed. The packages com.aliyun.openservices.* and com.aliyun.openservices.oss.* have been replaced with com.aliyun.oss.*.

Demo

OSS Java SDK provides Maven- and Ants-based demos. You can compile and run a demo on your local device. You can also develop your own applications based on the demo. For more information about how to compile and run a demo, see README.md.

Code samples

OSS SDK for Java provides a variety of code samples for your reference or use. 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 object
UploadSample.java Resumable upload
MultipartUploadSample.java Multipart upload
GetProgressSample.java Upload progress bars
CallbackSample.java Callback
CRCSample.java CRC for file upload
SimpleGetObjectSample.java Download objects
DownloadSample.java Resumable download
ObjectMetaSample.java 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-leeching, and CORS
ImageSample.java Image processing
PostObjectSample.java PostObject is independent of Java SDK
ConcurrentGetObjectSample.java Download an object concurrently, Resumable download recommended
Thank you! We've received your feedback.