@Deprecated public class TOSClient extends Object implements TOS
| 构造器和说明 |
|---|
TOSClient(Session session)
已过时。
|
TOSClient(String endpoint,
ClientOptionsBuilder... options)
已过时。
|
| 限定符和类型 | 方法和说明 |
|---|---|
AbortMultipartUploadOutput |
abortMultipartUpload(String bucket,
AbortMultipartUploadInput input)
已过时。
abort a multipart upload operation
|
AppendObjectOutput |
appendObject(String bucket,
String objectKey,
InputStream content,
long offset,
RequestOptionsBuilder... builders)
已过时。
append content at the tail of an appendable object
|
CompleteMultipartUploadOutput |
completeMultipartUpload(String bucket,
CompleteMultipartUploadInput input)
已过时。
complete a multipart upload operation
|
CopyObjectOutput |
copyObject(String bucket,
String srcObjectKey,
String dstObjectKey,
RequestOptionsBuilder... builders)
已过时。
copy an object in the same bucket
|
CopyObjectOutput |
copyObjectFrom(String bucket,
String srcBucket,
String srcObjectKey,
String dstObjectKey,
RequestOptionsBuilder... builders)
已过时。
copy an object from bucket A to bucket B, the method is called by bucket B.
|
CopyObjectOutput |
copyObjectTo(String bucket,
String dstBucket,
String dstObjectKey,
String srcObjectKey,
RequestOptionsBuilder... builders)
已过时。
copy an object from bucket A to bucket B, the method is called by bucket A.
|
CreateBucketOutput |
createBucket(CreateBucketInput input)
已过时。
create a new bucket
|
CreateMultipartUploadOutput |
createMultipartUpload(String bucket,
String objectKey,
RequestOptionsBuilder... builders)
已过时。
create a multipart upload operation
|
DeleteBucketOutput |
deleteBucket(String bucket)
已过时。
delete an existed bucket
|
DeleteBucketPolicyOutput |
deleteBucketPolicy(String bucket)
已过时。
删除桶策略
|
DeleteMultiObjectsOutput |
deleteMultiObjects(String bucket,
DeleteMultiObjectsInput input,
RequestOptionsBuilder... builders)
已过时。
delete a list of objects
|
DeleteObjectOutput |
deleteObject(String bucket,
String objectKey,
RequestOptionsBuilder... builders)
已过时。
delete an object
|
GetBucketPolicyOutput |
getBucketPolicy(String bucket)
已过时。
获取桶策略
|
Config |
getConfig()
已过时。
|
Credentials |
getCredentials()
已过时。
|
String |
getHost()
已过时。
|
GetObjectOutput |
getObject(String bucket,
String objectKey,
RequestOptionsBuilder... builders)
已过时。
get data and metadata of an object
|
GetObjectAclOutput |
getObjectAcl(String bucket,
String objectKey,
RequestOptionsBuilder... builders)
已过时。
get object's acl grants or rules
|
String |
getScheme()
已过时。
|
Signer |
getSigner()
已过时。
|
Transport |
getTransport()
已过时。
|
int |
getUrlMode()
已过时。
|
String |
getUserAgent()
已过时。
|
HeadBucketOutput |
headBucket(String bucket)
已过时。
get bucket's meta data
|
HeadObjectOutput |
headObject(String bucket,
String objectKey,
RequestOptionsBuilder... builders)
已过时。
get metadata of an object with its data stream
|
ListBucketsOutput |
listBuckets(ListBucketsInput input)
已过时。
list existed bucket owned by you.
|
ListMultipartUploadsOutput |
listMultipartUploads(String bucket,
ListMultipartUploadsInput input)
已过时。
list multipart uploads
|
ListObjectsOutput |
listObjects(String bucket,
ListObjectsInput input)
已过时。
list objects of a bucket
|
ListObjectVersionsOutput |
listObjectVersions(String bucket,
ListObjectVersionsInput input)
已过时。
list multi-version objects of a bucket
|
ListUploadedPartsOutput |
listUploadedParts(String bucket,
ListUploadedPartsInput input,
RequestOptionsBuilder... builders)
已过时。
list parts that have been uploaded.
|
protected RequestBuilder |
newBuilder(String bucket,
String object,
RequestOptionsBuilder... builders)
已过时。
|
String |
preSignedURL(String httpMethod,
String bucket,
String objectKey,
Duration ttl,
RequestOptionsBuilder... builders)
已过时。
create a pre-signed URL
|
PutBucketPolicyOutput |
putBucketPolicy(String bucket,
String policy)
已过时。
设置桶策略
|
PutObjectOutput |
putObject(String bucket,
String objectKey,
InputStream inputStream,
RequestOptionsBuilder... builders)
已过时。
upload an object to TOS server
|
PutObjectAclOutput |
putObjectAcl(String bucket,
PutObjectAclInput input)
已过时。
set object's acl grants or rules
|
TOSClient |
setConfig(Config config)
已过时。
|
TOSClient |
setCredentials(Credentials credentials)
已过时。
|
TOSClient |
setHost(String host)
已过时。
|
SetObjectMetaOutput |
setObjectMeta(String bucket,
String objectKey,
RequestOptionsBuilder... builders)
已过时。
set some metadata of the object
|
TOSClient |
setScheme(String scheme)
已过时。
|
TOSClient |
setSigner(Signer signer)
已过时。
|
TOSClient |
setTransport(Transport transport)
已过时。
|
TOSClient |
setUrlMode(int urlMode)
已过时。
|
TOSClient |
setUserAgent(String userAgent)
已过时。
|
String |
toString()
已过时。
|
UploadFileOutput |
uploadFile(String bucket,
UploadFileInput input,
RequestOptionsBuilder... builders)
已过时。
|
UploadPartOutput |
uploadPart(String bucket,
UploadPartInput input,
RequestOptionsBuilder... builders)
已过时。
upload a part for a multipart upload operation
|
UploadPartCopyOutput |
uploadPartCopy(String bucket,
UploadPartCopyInput input,
RequestOptionsBuilder... builders)
已过时。
copy a part of object as a part of a multipart upload operation
|
public TOSClient(Session session)
public TOSClient(String endpoint, ClientOptionsBuilder... options)
protected RequestBuilder newBuilder(String bucket, String object, RequestOptionsBuilder... builders)
public CreateBucketOutput createBucket(CreateBucketInput input) throws TosException
TOScreateBucket 在接口中 TOSinput - require input's bucketName not nullCreateBucketOutputTosExceptionpublic HeadBucketOutput headBucket(String bucket) throws TosException
TOSheadBucket 在接口中 TOSbucket - bucket nameHeadBucketOutputTosExceptionpublic DeleteBucketOutput deleteBucket(String bucket) throws TosException
TOSdeleteBucket 在接口中 TOSbucket - bucket nameDeleteBucketOutputTosExceptionpublic ListBucketsOutput listBuckets(ListBucketsInput input) throws TosException
TOSlistBuckets 在接口中 TOSinput - no params requiredListBucketsOutputTosExceptionpublic PutBucketPolicyOutput putBucketPolicy(String bucket, String policy) throws TosException
TOSputBucketPolicy 在接口中 TOSbucket - 桶名policy - 桶策略TosExceptionpublic GetBucketPolicyOutput getBucketPolicy(String bucket) throws TosException
TOSgetBucketPolicy 在接口中 TOSbucket - 桶名TosExceptionpublic DeleteBucketPolicyOutput deleteBucketPolicy(String bucket) throws TosException
TOSdeleteBucketPolicy 在接口中 TOSbucket - 桶名TosExceptionpublic GetObjectOutput getObject(String bucket, String objectKey, RequestOptionsBuilder... builders) throws TosException
TOSgetObject 在接口中 TOSbucket - the bucket to operateobjectKey - the name of objectbuilders - optional. setting withXXX properties.
withVersionID: which version of this object.
withRange: the range of content.
withIfModifiedSince: return if the object modified after the given date,
otherwise return status code 304.
withIfUnmodifiedSince, withIfMatch, withIfNoneMatch set If-Unmodified-Since, If-Match and If-None-Match.GetObjectOutputTosExceptionpublic HeadObjectOutput headObject(String bucket, String objectKey, RequestOptionsBuilder... builders) throws TosException
TOSheadObject 在接口中 TOSbucket - the bucket to operateobjectKey - the name of objectbuilders - optional. setting withXXX properties.
withVersionID: which version of this object.
withRange: the range of content.
withIfModifiedSince: return if the object modified after the given date,
otherwise return status code 304.
withIfUnmodifiedSince, withIfMatch, withIfNoneMatch set If-Unmodified-Since, If-Match and If-None-Match.HeadObjectOutputTosExceptionpublic DeleteObjectOutput deleteObject(String bucket, String objectKey, RequestOptionsBuilder... builders) throws TosException
TOSdeleteObject 在接口中 TOSbucket - the bucket to operateobjectKey - the name of objectbuilders - optional. setting withXXX properties.
withVersionID: which version of this object will be deletedDeleteObjectOutputTosExceptionpublic DeleteMultiObjectsOutput deleteMultiObjects(String bucket, DeleteMultiObjectsInput input, RequestOptionsBuilder... builders) throws TosException
TOSdeleteMultiObjects 在接口中 TOSbucket - the bucket to operateinput - the objects to be deletedbuilders - optional. setting withXXX properties.DeleteMultiObjectsOutputTosExceptionpublic PutObjectOutput putObject(String bucket, String objectKey, InputStream inputStream, RequestOptionsBuilder... builders) throws TosException
TOSputObject 在接口中 TOSbucket - the bucket to operateobjectKey - the name of objectinputStream - the content of objectbuilders - optional. setting withXXX properties.
withContentType: set Content-Type.
withContentDisposition: set Content-Disposition.
withContentLanguage: set Content-Language.
withContentEncoding: set Content-Encoding.
withCacheControl: set Cache-Control.
withExpires: set Expires.
withMeta: set meta header(s).
withContentSHA256: set Content-Sha256.
withContentMD5: set Content-MD5.
withExpires: set Expires.
withServerSideEncryptionCustomer: set server side encryption options.
withACL, withACLGrantFullControl, withACLGrantRead, withACLGrantReadAcp,
withACLGrantWrite, withACLGrantWriteAcp set object acl.
withStorageClass set storage class, 'STANDARD|IA'PutObjectOutputTosExceptionpublic UploadFileOutput uploadFile(String bucket, UploadFileInput input, RequestOptionsBuilder... builders) throws TosException
uploadFile 在接口中 TOSTosExceptionpublic AppendObjectOutput appendObject(String bucket, String objectKey, InputStream content, long offset, RequestOptionsBuilder... builders) throws TosException
TOSappendObject 在接口中 TOSbucket - the bucket to operateobjectKey - the name of objectcontent - the content of objectoffset - append position, equals to the current object-sizebuilders - optional. setting withXXX properties.
withContentType: set Content-Type.
withContentDisposition: set Content-Disposition.
withContentLanguage: set Content-Language.
withContentEncoding: set Content-Encoding.
withCacheControl: set Cache-Control.
withExpires: set Expires.
withMeta: set meta header(s).
withExpires: set Expires.
withACL, withACLGrantFullControl, withACLGrantRead, withACLGrantReadAcp,
withACLGrantWrite, withACLGrantWriteAcp set object acl.
withStorageClass set storage class, 'STANDARD|IA'
above options only take effect when offset parameter is 0.
withContentSHA256: set Content-Sha256.
withContentMD5: set Content-MD5.AppendObjectOutputTosExceptionpublic SetObjectMetaOutput setObjectMeta(String bucket, String objectKey, RequestOptionsBuilder... builders) throws TosException
TOSsetObjectMeta 在接口中 TOSbucket - the bucket to operateobjectKey - the name of objectbuilders - optional. setting withXXX properties.
withContentType set Content-Type.
withContentDisposition set Content-Disposition.
withContentLanguage set Content-Languag.
withContentEncoding set Content-Encoding.
withCacheControl set Cache-Control.
withExpires set Expires.
withMeta set meta header(s).
withVersionID which version of this object will be setSetObjectMetaOutputTosExceptionpublic ListObjectsOutput listObjects(String bucket, ListObjectsInput input) throws TosException
TOSlistObjects 在接口中 TOSbucket - the bucket to operateinput - query paramsListObjectsOutputTosExceptionpublic ListObjectVersionsOutput listObjectVersions(String bucket, ListObjectVersionsInput input) throws TosException
TOSlistObjectVersions 在接口中 TOSbucket - the bucket to operateinput - query paramsListObjectVersionsOutputTosExceptionpublic CopyObjectOutput copyObject(String bucket, String srcObjectKey, String dstObjectKey, RequestOptionsBuilder... builders) throws TosException
TOScopyObject 在接口中 TOSbucket - the bucket to operatesrcObjectKey - the source object namedstObjectKey - the destination object name
NOTICE: srcObjectKey and dstObjectKey belongs to the same bucket.builders - optional. setting withXXX properties.
withVersionID the version id of source object.
withMetadataDirective copy source object metadata or replace with new object metadata.
withACL withACLGrantFullControl withACLGrantRead withACLGrantReadAcp
withACLGrantWrite withACLGrantWriteAcp set object acl.
withCopySourceIfMatch withCopySourceIfNoneMatch withCopySourceIfModifiedSince
withCopySourceIfUnmodifiedSince set copy conditions.
withStorageClass set storage class, 'STANDARD|IA'
withServerSideEncryptionCustomer: Copy SSE-C加密对象,源对象的加密算法、加密密钥、密钥MD5
if copyObject called with withMetadataDirective(TosHeaders.METADATA_DIRECTIVE_REPLACE),
these properties can be used:
withContentType set Content-Type.
withContentDisposition set Content-Disposition.
withContentLanguage set Content-Language.
withContentEncoding set Content-Encoding.
withCacheControl set Cache-Control.
withExpires set Expires.
withMeta set meta header(s),CopyObjectOutputTosExceptionpublic CopyObjectOutput copyObjectTo(String bucket, String dstBucket, String dstObjectKey, String srcObjectKey, RequestOptionsBuilder... builders) throws TosException
TOScopyObjectTo 在接口中 TOSbucket - the bucket to operatedstBucket - the destination bucketdstObjectKey - the destination object namesrcObjectKey - the source object namebuilders - optional. setting withXXX properties.
withVersionID the version id of source object.
withMetadataDirective copy source object metadata or replace with new object metadata.
withACL withACLGrantFullControl withACLGrantRead withACLGrantReadAcp
withACLGrantWrite withACLGrantWriteAcp set object acl.
withCopySourceIfMatch withCopySourceIfNoneMatch withCopySourceIfModifiedSince
withCopySourceIfUnmodifiedSince set copy conditions.
withStorageClass set storage class, 'STANDARD|IA'
withServerSideEncryptionCustomer: Copy SSE-C加密对象,源对象的加密算法、加密密钥、密钥MD5
if copyObjectTo called with withMetadataDirective(TosHeaders.METADATA_DIRECTIVE_REPLACE),
these properties can be used:
withContentType set Content-Type.
withContentDisposition set Content-Disposition.
withContentLanguage set Content-Language.
withContentEncoding set Content-Encoding.
withCacheControl set Cache-Control.
withExpires set Expires.
withMeta set meta header(s).CopyObjectOutputTosExceptionpublic CopyObjectOutput copyObjectFrom(String bucket, String srcBucket, String srcObjectKey, String dstObjectKey, RequestOptionsBuilder... builders) throws TosException
TOScopyObjectFrom 在接口中 TOSbucket - the bucket to operatesrcBucket - the source bucketsrcObjectKey - the source object namedstObjectKey - the destination object namebuilders - optional. setting withXXX properties.
withVersionID the version id of source object.
withMetadataDirective copy source object metadata or replace with new object metadata.
withACL withACLGrantFullControl withACLGrantRead withACLGrantReadAcp
withACLGrantWrite withACLGrantWriteAcp set object acl.
withCopySourceIfMatch withCopySourceIfNoneMatch withCopySourceIfModifiedSince
withCopySourceIfUnmodifiedSince set copy conditions.
withStorageClass set storage class, 'STANDARD|IA'
withServerSideEncryptionCustomer: Copy SSE-C加密对象,源对象的加密算法、加密密钥、密钥MD5
if copyObjectFrom called with withMetadataDirective(TosHeaders.METADATA_DIRECTIVE_REPLACE),
these properties can be used:
withContentType set Content-Type.
withContentDisposition set Content-Disposition.
withContentLanguage set Content-Language.
withContentEncoding set Content-Encoding.
withCacheControl set Cache-Control.
withExpires set Expires.
withMeta set meta header(s).CopyObjectOutputTosExceptionpublic UploadPartCopyOutput uploadPartCopy(String bucket, UploadPartCopyInput input, RequestOptionsBuilder... builders) throws TosException
TOSuploadPartCopy 在接口中 TOSbucket - the bucket to operateinput - uploadID, destinationKey, sourceBucket, sourceKey, partNumber, partSize and startOffset are inclusive,
other parameters are optional.builders - optional. setting withXXX properties.
withCopySourceIfMatch, withCopySourceIfNoneMatch, withCopySourceIfModifiedSince and
withCopySourceIfUnmodifiedSince set copy conditions
withServerSideEncryption: set server side encryption algorithm, 'AES256'.
withServerSideEncryptionCustomer: Copy SSE-C加密对象,源对象的加密算法、加密密钥、密钥MD5UploadPartCopyOutputTosExceptionpublic PutObjectAclOutput putObjectAcl(String bucket, PutObjectAclInput input) throws TosException
TOSputObjectAcl 在接口中 TOSbucket - the bucket to operateinput - aclGrant, aclRules can not set both.PutObjectAclOutputTosExceptionpublic GetObjectAclOutput getObjectAcl(String bucket, String objectKey, RequestOptionsBuilder... builders) throws TosException
TOSgetObjectAcl 在接口中 TOSbucket - the bucket to operateobjectKey - the name of objectbuilders - optional. setting withXXX properties.
withVersionID the version of the objectGetObjectAclOutputTosExceptionpublic CreateMultipartUploadOutput createMultipartUpload(String bucket, String objectKey, RequestOptionsBuilder... builders) throws TosException
TOScreateMultipartUpload 在接口中 TOSbucket - the bucket to operateobjectKey - the name of objectbuilders - optional. setting withXXX properties.
withContentType set Content-Type.
withContentDisposition set Content-Disposition.
withContentLanguage set Content-Language.
withContentEncoding set Content-Encoding.
withCacheControl set Cache-Control.
withExpires set Expires.
withMeta set meta header(s).
withContentSHA256 set Content-Sha256.
withContentMD5 set Content-MD5.
withExpires set Expires.
withServerSideEncryptionCustomer set server side encryption options.
withACL, WithACLGrantFullControl, withACLGrantRead, withACLGrantReadAcp,
withACLGrantWrite, withACLGrantWriteAcp set object acl.
withStorageClass set storage class, 'STANDARD|IA'.
withServerSideEncryption: set server side encryption algorithm, 'AES256'.CreateMultipartUploadOutputTosExceptionpublic UploadPartOutput uploadPart(String bucket, UploadPartInput input, RequestOptionsBuilder... builders) throws TosException
TOSuploadPart 在接口中 TOSbucket - the bucket to operateinput - some params are required, eg, key, uploadID, partSize, partNumber and partNumberbuilders - optional. setting withXXX properties.UploadPartOutputTosExceptionpublic CompleteMultipartUploadOutput completeMultipartUpload(String bucket, CompleteMultipartUploadInput input) throws TosException
TOScompleteMultipartUpload 在接口中 TOSbucket - the bucket to operateinput - key: the object name,
uploadID: the uploadID got from CreateMultipartUpload,
uploadedParts: upload part output got from uploadPart or uploadPartCopyCompleteMultipartUploadOutputTosExceptionpublic AbortMultipartUploadOutput abortMultipartUpload(String bucket, AbortMultipartUploadInput input) throws TosException
TOSabortMultipartUpload 在接口中 TOSbucket - the bucket to operateAbortMultipartUploadOutputTosExceptionpublic ListUploadedPartsOutput listUploadedParts(String bucket, ListUploadedPartsInput input, RequestOptionsBuilder... builders) throws TosException
TOSlistUploadedParts 在接口中 TOSbucket - the bucket to operateinput - key, uploadID and other parametersbuilders - optional. setting withXXX properties.ListUploadedPartsOutputTosExceptionpublic ListMultipartUploadsOutput listMultipartUploads(String bucket, ListMultipartUploadsInput input) throws TosException
TOSlistMultipartUploads 在接口中 TOSbucket - the bucket to operateinput - ListMultipartUploadsInputListMultipartUploadsOutputTosExceptionpublic String preSignedURL(String httpMethod, String bucket, String objectKey, Duration ttl, RequestOptionsBuilder... builders) throws TosException
TOSpreSignedURL 在接口中 TOShttpMethod - the http method in the URL, such as GET, POST, PUT, HEADbucket - the bucket to operateobjectKey - the object namettl - the time-to-live of signed URLbuilders - withVersionID the version id of the objectTosExceptionpublic String getScheme()
public String getHost()
public int getUrlMode()
public TOSClient setUrlMode(int urlMode)
public String getUserAgent()
public Credentials getCredentials()
public TOSClient setCredentials(Credentials credentials)
public Signer getSigner()
public Transport getTransport()
public Config getConfig()
Copyright © 2025. All rights reserved.