Package com.qiniu.storage.persistent
Class FileRecorder
- java.lang.Object
-
- com.qiniu.storage.persistent.FileRecorder
-
-
Constructor Summary
Constructors Constructor Description FileRecorder(java.io.File directory)断点记录文件保存的目录FileRecorder(java.lang.String directory)断点记录文件保存的目录
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddel(java.lang.String key)删除已上传文件的进度文件byte[]get(java.lang.String key)获取分片上传进度java.lang.StringrecorderKeyGenerate(java.lang.String key, java.io.File file)根据服务器的key和本地文件名生成持久化纪录的keyjava.lang.StringrecorderKeyGenerate(java.lang.String bucket, java.lang.String key, java.lang.String contentDataSUID, java.lang.String uploaderSUID)根据目标bucket, key和本地文件名生成持久化纪录的keyvoidset(java.lang.String key, byte[] data)纪录分片上传进度
-
-
-
Constructor Detail
-
FileRecorder
public FileRecorder(java.lang.String directory) throws java.io.IOException断点记录文件保存的目录- Parameters:
directory- 目录- Throws:
java.io.IOException- 异常
-
FileRecorder
public FileRecorder(java.io.File directory) throws java.io.IOException断点记录文件保存的目录- Parameters:
directory- 目录- Throws:
java.io.IOException- 异常
-
-
Method Detail
-
set
public void set(java.lang.String key, byte[] data)纪录分片上传进度
-
get
public byte[] get(java.lang.String key)
获取分片上传进度
-
del
public void del(java.lang.String key)
删除已上传文件的进度文件
-
recorderKeyGenerate
public java.lang.String recorderKeyGenerate(java.lang.String key, java.io.File file)Description copied from interface:Recorder根据服务器的key和本地文件名生成持久化纪录的key- Specified by:
recorderKeyGeneratein interfaceRecorder- Parameters:
key- 服务器的keyfile- 本地文件名- Returns:
- 持久化上传纪录的key
-
recorderKeyGenerate
public java.lang.String recorderKeyGenerate(java.lang.String bucket, java.lang.String key, java.lang.String contentDataSUID, java.lang.String uploaderSUID)Description copied from interface:Recorder根据目标bucket, key和本地文件名生成持久化纪录的key- Specified by:
recorderKeyGeneratein interfaceRecorder- Parameters:
bucket- 空间名或其变换的值key- 文件名或其变换的值contentDataSUID- 上传内容的标识字符串uploaderSUID- 上传方式的标识字符串- Returns:
- 持久化上传纪录的key
-
-