Example Programs

OBS Java SDK provides abundant example programs for your reference and direct use. These programs can be obtained from the OBS Java SDK. For example, files in eSDK_Storage_OBS_<VersionId>_Java.zip obtained by decompressing eSDK_Storage_OBS_<VersionId>_Java/samples_java are example programs. Alternatively, you can click code package names provided in the following table to obtain corresponding example programs.

Example programs include:

Sample Code

Description

BucketOperationsSample

How to use bucket-related APIs.

ObjectOperationsSample

How to use object-related APIs.

DownloadSample

How to download an object.

CreateFolderSample

How to create a folder.

DeleteObjectsSample

How to delete objects in a batch.

ListObjectsSample

How to list objects.

ListVersionsSample

How to list versioning objects.

ListObjectsInFolderSample

How to list objects in a folder.

ObjectMetaSample

How to customize object metadata.

SimpleMultipartUploadSample

How to perform a multipart upload.

RestoreObjectSample

How to download Archive objects.

ConcurrentCopyPartSample

How to concurrently copy parts of a large object.

ConcurrentDownloadObjectSample

How to concurrently download parts of a large object.

ConcurrentUploadPartSample

How to concurrently upload parts of a large object.

PostObjectSample

How to perform a browser-based upload.

TemporarySignatureSample

How to use URLs for authorized access.

GetTokenSample

How to obtain the security token.