public class KodoClient extends Object
Constructor and Description |
---|
KodoClient(com.qiniu.util.Auth auth,
String bucketName,
String downloadHost,
String endPoint,
com.qiniu.storage.Configuration cfg,
okhttp3.OkHttpClient okHttpClient)
Creates a new instance of
KodoClient . |
Modifier and Type | Method and Description |
---|---|
void |
copyObject(String src,
String dst)
Copys object in Qiniu kodo.
|
void |
createEmptyObject(String key)
Creates empty Object in Qiniu kodo.
|
void |
deleteObject(String key)
Deletes Object in Qiniu kodo.
|
String |
getBucketName()
Gets bucketname for kodoclient.
|
com.qiniu.storage.model.FileInfo |
getFileInfo(String key)
Gets file from for Qiniu kodo.
|
InputStream |
getObject(String key,
long startPos,
long endPos,
long contentLength)
Gets object from Qiniu kodo.
|
com.qiniu.storage.model.FileListing |
listFiles(String prefix,
String marker,
int limit,
String delimiter)
Lists object for Qiniu kodo.
|
void |
uploadFile(String Key,
File File)
Puts Object to Qiniu kodo.
|
public KodoClient(com.qiniu.util.Auth auth, String bucketName, String downloadHost, String endPoint, com.qiniu.storage.Configuration cfg, okhttp3.OkHttpClient okHttpClient)
KodoClient
.auth
- Qiniu authenticationbucketName
- bucketname for kododownloadHost
- download host for kodoendPoint
- endpoint for kodocfg
- configuration for Qiniu SDKokHttpClient
- http clientpublic String getBucketName()
public com.qiniu.storage.model.FileInfo getFileInfo(String key) throws com.qiniu.common.QiniuException
key
- Object jeycom.qiniu.common.QiniuException
public InputStream getObject(String key, long startPos, long endPos, long contentLength) throws IOException
key
- object keystartPos
- start index for objectendPos
- end index for objectcontentLength
- object file sizeIOException
public void uploadFile(String Key, File File) throws com.qiniu.common.QiniuException
Key
- Object key for kodoFile
- Alluxio Filecom.qiniu.common.QiniuException
public void copyObject(String src, String dst) throws com.qiniu.common.QiniuException
src
- source Object keydst
- destination Object Keycom.qiniu.common.QiniuException
public void createEmptyObject(String key) throws com.qiniu.common.QiniuException
key
- empty Object keycom.qiniu.common.QiniuException
public void deleteObject(String key) throws com.qiniu.common.QiniuException
key
- Object keycom.qiniu.common.QiniuException
public com.qiniu.storage.model.FileListing listFiles(String prefix, String marker, int limit, String delimiter) throws com.qiniu.common.QiniuException
prefix
- prefix for bucketmarker
- Marker returned the last time a file list was obtainedlimit
- Length limit for each iteration, Max. 1000delimiter
- Specifies a directory separator that lists all common prefixes (simulated
listing directory effects). The default is an empty stringcom.qiniu.common.QiniuException
Copyright © 2023. All Rights Reserved.