All Products
Search
Document Center

Object Storage Service:Introduction

Last Updated:Jul 17, 2024

This topic is written based on Object Storage Service (OSS) SDK for Java 3.17.2.

Versions

Before you download OSS SDK for Java, select a version based on your needs. OSS manages download links for the source code of OSS SDK for Java by using a Maven repository and provides the source code on GitHub for your reference.

Source

Description

Maven repository

The path where you can download the source code of OSS SDK for Java. You can obtain the version of dependencies to be injected into OSS SDK for Java for your Maven project from the Maven repository.

Note

We recommend that you obtain the latest version of OSS SDK for Java for debugging to prevent errors.

For more information, visit Alibaba Cloud OSS SDK for Java.

GitHub

GitHub provides the source code of OSS SDKs and records tag information about the releases of the SDKs. You can view the source code and sample code in a variety of scenarios on GitHub. For more information, visit Alibaba Cloud OSS SDK Releases for Java.

Compatibility

Version compatibility of OSS SDK for Java:

  • OSS SDK for Java V3.x.x:

    • API operations: compatible

    • Namespace: compatible

  • OSS SDK for Java V2.x.x:

    • API operations: compatible

    • Namespace: compatible

  • OSS SDK for Java V1.0.x:

    • API operations: compatible

    • Namespace: incompatible. The code for Tablestore in OSS SDK for Java V1.0.x is removed from OSS SDK for Java V2.0.0 and the package names com.aliyun.openservices.* and com.aliyun.openservices.oss.* are changed to com.aliyun.oss.*.

Source code and API documentation

For more information about the source code of OSS SDK for Java, visit GitHub. For more information about the API documentation, visit Aliyun OSS SDK for Java 3.13.2 API.

Sample code

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

Sample code file

Content

GetStartedSample.java

Quick start

BucketOperationsSample.java

BucketTaggingSample.java

Bucket tagging

BucketInventorySample.java

Bucket inventories

BucketPolicySample.java

Bucket Policy

BucketWormSample.java

Retention policies

SetRequestPaymentSample.java

Pay-by-requester

BucketReplicationSample.java

Data replication

BucketTransferAccelerationSample.java

Transfer acceleration

CreateFolderSample.java

Simple upload

PostObjectSample.java

Form upload

Note

Call PostObject to perform form upload. The implementation of form upload is independent of OSS SDK for Java.

AppendObjectSample.java

Append upload

UploadSample.java

Resumable upload

MultipartUploadSample.java

Multipart upload

CallbackSample.java

Upload callback

SimpleGetObjectSample.java

Download objects

DownloadSample.java

Resumable download

ConcurrentGetObjectSample.java

Resumable download

GetProgressSample.java

GetStartedSample.java

ObjectMetaSample.java

Manage object metadata

StorageTypeSample.java

Convert the storage classes of objects

ListObjectsSample.java

List objects

SelectObjectSample.java

Query objects

ObjectOperationSample.java

Rename objects

DeleteObjectsSample.java

Delete objects

UploadPartCopySample.java

Copy objects

ObjectOperationSample.java

Prevent objects from being overwritten by objects that have the same names

RestoreObjectSample.java

Restore objects

SymLinkSample.java

Manage symbolic links

DirectoryManageSample.java

Manage directories

BucketVersioningSample.java

Versioning

ObjectTaggingSample.java

TrafficLimitSample.java

Single-connection bandwidth throttling

Client-side encryption

EncryptionServiceSample.java

Server-side encryption

AuthorizedAccessSample.java

Authorize access

CRCSample.java

CRC-64 verification

ImageSample.java

Overview