| 构造器和说明 |
|---|
OssUpload() |
| 限定符和类型 | 方法和说明 |
|---|---|
static List<String> |
batchDeleteFile(com.aliyun.oss.OSSClient ossClient,
OssProperties ossProperties,
List<String> keys)
batchDeleteFile 批量删除文件
删除文件。
|
static boolean |
checkFileWhetherExist(com.aliyun.oss.OSSClient ossClient,
OssProperties ossProperties,
String fileName)
检查文件是否存在
|
static void |
deleteFile(com.aliyun.oss.OSSClient ossClient,
OssProperties ossProperties,
String objectName)
deleteFile 单个文件删除
删除文件。
|
static List<String> |
deleteSpecifiedPrefixFile(com.aliyun.oss.OSSClient ossClient,
OssProperties ossProperties,
String prefix)
DeleteSpecifiedPrefixFile 删除指定前缀文件
列举所有包含指定前缀的文件并删除
|
static List<String> |
listFiles(com.aliyun.oss.OSSClient ossClient,
OssProperties ossProperties,
String prefix)
listFiles 列举文件
列举文件。
|
static String |
upload(com.aliyun.oss.OSSClient ossClient,
OssProperties ossProperties,
String fileName,
InputStream inputStream)
默认上传
|
static String |
upload(com.aliyun.oss.OSSClient ossClient,
OssProperties ossProperties,
String fileName,
InputStream inputStream,
long expireTime)
上传临时文件(设置过期时间不能访问,文件还是存在)
|
static String |
uploadByFilePath(com.aliyun.oss.OSSClient ossClient,
OssProperties ossProperties,
String fileName,
String filePath)
filePath上传
|
static String |
uploadByUrl(com.aliyun.oss.OSSClient ossClient,
OssProperties ossProperties,
String fileName,
String url)
url上传
|
public static List<String> listFiles(com.aliyun.oss.OSSClient ossClient, OssProperties ossProperties, String prefix)
ossClient - OSS客户端ossProperties - OSS配置属性prefix - 前缀public static List<String> deleteSpecifiedPrefixFile(com.aliyun.oss.OSSClient ossClient, OssProperties ossProperties, String prefix)
ossClient - OSS客户端ossProperties - OSS配置属性prefix - 前缀public static List<String> batchDeleteFile(com.aliyun.oss.OSSClient ossClient, OssProperties ossProperties, List<String> keys)
ossClient - OSS客户端ossProperties - OSS配置属性keys - 包含文件后缀在内的完整路径public static void deleteFile(com.aliyun.oss.OSSClient ossClient,
OssProperties ossProperties,
String objectName)
ossClient - OSS客户端ossProperties - OSS配置属性objectName - ObjectName设置为对应的文件夹名称public static boolean checkFileWhetherExist(com.aliyun.oss.OSSClient ossClient,
OssProperties ossProperties,
String fileName)
ossClient - OSS客户端ossProperties - OSS配置属性fileName - 文件名称public static String uploadByFilePath(com.aliyun.oss.OSSClient ossClient, OssProperties ossProperties, String fileName, String filePath) throws Exception
ossClient - OSS客户端ossProperties - OSS配置属性fileName - 文件名称filePath - 文件路劲Exception - 异常public static String uploadByUrl(com.aliyun.oss.OSSClient ossClient, OssProperties ossProperties, String fileName, String url) throws Exception
ossClient - OSS客户端ossProperties - OSS配置属性fileName - 文件名称url - urlException - 异常public static String upload(com.aliyun.oss.OSSClient ossClient, OssProperties ossProperties, String fileName, InputStream inputStream, long expireTime) throws Exception
ossClient - OSS客户端ossProperties - OSS配置属性fileName - 文件名称inputStream - 输入流expireTime - 超时时间Exception - 异常public static String upload(com.aliyun.oss.OSSClient ossClient, OssProperties ossProperties, String fileName, InputStream inputStream) throws Exception
ossClient - OSS客户端ossProperties - OSS配置属性fileName - 文件名称inputStream - 输入流Exception - 异常Copyright © 2020 Pivotal Software, Inc.. All Rights Reserved.