Bladeren bron

去除异常抛出

tianboguang 3 jaren geleden
bovenliggende
commit
ae38901f89

+ 15 - 15
4dkankan-utils-fyun-oss/src/main/java/com/fdkankan/fyun/oss/OssFileService.java

@@ -27,7 +27,7 @@ public class OssFileService extends AbstractFYunFileService {
     private OSS ossClient;
 
     @Override
-    public void uploadFile(String bucket, byte[] data, String remoteFilePath) throws Exception {
+    public void uploadFile(String bucket, byte[] data, String remoteFilePath) {
         try {
             ossClient.putObject(bucket, remoteFilePath, new ByteArrayInputStream(data));
         } catch (Exception e) {
@@ -41,16 +41,16 @@ public class OssFileService extends AbstractFYunFileService {
     }
 
     @Override
-    public void uploadFile(String bucket, String filePath, String remoteFilePath) throws Exception {
+    public void uploadFile(String bucket, String filePath, String remoteFilePath) {
         uploadFile(bucket, filePath, remoteFilePath, true, null);
     }
 
     @Override
-    public void uploadFile(String bucket, String filePath, String remoteFilePath, Map<String, String> headers) throws Exception {
+    public void uploadFile(String bucket, String filePath, String remoteFilePath, Map<String, String> headers) {
         uploadFile(bucket, filePath, remoteFilePath, true, headers);
     }
 
-    private void uploadFile(String bucket, String filePath, String remoteFilePath, Boolean shutdown,Map<String, String> headers) throws Exception {
+    private void uploadFile(String bucket, String filePath, String remoteFilePath, Boolean shutdown,Map<String, String> headers) {
         try {
             File file = new File(filePath);
             if (!file.exists()) {
@@ -84,7 +84,7 @@ public class OssFileService extends AbstractFYunFileService {
     }
 
     @Override
-    public void uploadFileByCommand(String bucket, String filePath, String remoteFilePath) throws Exception {
+    public void uploadFileByCommand(String bucket, String filePath, String remoteFilePath) {
         String ossPath = bucket + "/" + remoteFilePath;
         try {
             String command = String.format(OssConstants.UPLOAD_SH, ossPath, filePath);
@@ -111,7 +111,7 @@ public class OssFileService extends AbstractFYunFileService {
     }
 
     @Override
-    public void deleteFolder(String bucket, String remoteFolderPath) throws Exception {
+    public void deleteFolder(String bucket, String remoteFolderPath) {
         try {
             List<String> remoteFiles = listRemoteFiles(bucket, remoteFolderPath, false);
             if (CollectionUtils.isEmpty(remoteFiles)) {
@@ -131,7 +131,7 @@ public class OssFileService extends AbstractFYunFileService {
     }
 
     @Override
-    public void uploadMulFiles(String bucket, Map<String, String> filepaths) throws Exception {
+    public void uploadMulFiles(String bucket, Map<String, String> filepaths) {
         try {
             for (Map.Entry<String, String> entry : filepaths.entrySet()) {
                 uploadFile(bucket, entry.getKey(), entry.getValue(), false,null);
@@ -147,11 +147,11 @@ public class OssFileService extends AbstractFYunFileService {
 
 
     @Override
-    public List<String> listRemoteFiles(String bucket, String sourcePath) throws Exception {
+    public List<String> listRemoteFiles(String bucket, String sourcePath) {
         return listRemoteFiles(bucket, sourcePath, true);
     }
 
-    private List<String> listRemoteFiles(String bucket, String sourcePath, Boolean shutdown) throws Exception {
+    private List<String> listRemoteFiles(String bucket, String sourcePath, Boolean shutdown) {
         List<String> keyList = new ArrayList<>();
         try {
             boolean flag = true;
@@ -186,11 +186,11 @@ public class OssFileService extends AbstractFYunFileService {
     }
 
     @Override
-    public void copyFileBetweenBucket(String sourceBucketName, String sourcePath, String targetBucketName, String targetPath) throws Exception {
+    public void copyFileBetweenBucket(String sourceBucketName, String sourcePath, String targetBucketName, String targetPath) {
         copyFileBetweenBucket(sourceBucketName, sourcePath, targetBucketName, targetPath, true);
     }
 
-    private void copyFileBetweenBucket(String sourceBucketName, String sourcePath, String targetBucketName, String targetPath, Boolean shutdown) throws Exception {
+    private void copyFileBetweenBucket(String sourceBucketName, String sourcePath, String targetBucketName, String targetPath, Boolean shutdown) {
         try {
             List<String> files = listRemoteFiles(sourceBucketName, sourcePath, false);
             if (ObjectUtils.isEmpty(files)) {
@@ -209,7 +209,7 @@ public class OssFileService extends AbstractFYunFileService {
     }
 
     @Override
-    public void copyFilesBetweenBucket(String sourceBucketName, String targetBucketName, Map<String, String> pathMap) throws Exception {
+    public void copyFilesBetweenBucket(String sourceBucketName, String targetBucketName, Map<String, String> pathMap) {
         if (ObjectUtils.isEmpty(pathMap)) {
             return;
         }
@@ -227,7 +227,7 @@ public class OssFileService extends AbstractFYunFileService {
     }
 
     @Override
-    public String getFileContent(String bucketName, String remoteFilePath) throws Exception {
+    public String getFileContent(String bucketName, String remoteFilePath) {
         try {
             OSSObject ossObject = ossClient.getObject(bucketName, remoteFilePath);
             InputStream objectContent = ossObject.getObjectContent();
@@ -253,7 +253,7 @@ public class OssFileService extends AbstractFYunFileService {
     }
 
     @Override
-    public boolean fileExist(String bucket, String objectName) throws Exception {
+    public boolean fileExist(String bucket, String objectName) {
         try {
             return ossClient.doesObjectExist(bucket, objectName);
         } catch (Exception e) {
@@ -267,7 +267,7 @@ public class OssFileService extends AbstractFYunFileService {
     }
 
     @Override
-    public void downloadFile(String bucket, String remoteFilePath, String localPath) throws Exception {
+    public void downloadFile(String bucket, String remoteFilePath, String localPath) {
         try {
             File localFile = new File(localPath);
             if (!localFile.getParentFile().exists()) {

+ 14 - 14
4dkankan-utils-fyun-parent/src/main/java/com/fdkankan/fyun/face/AbstractFYunFileService.java

@@ -15,22 +15,22 @@ public abstract class AbstractFYunFileService implements FYunFileServiceInterfac
     public FYunFileConfig fYunFileConfig;
 
     @Override
-    public void uploadFile(byte[] data, String remoteFilePath) throws Exception {
+    public void uploadFile(byte[] data, String remoteFilePath) {
         uploadFile(fYunFileConfig.getBucket(), data, remoteFilePath);
     }
 
     @Override
-    public void uploadFile(String filePath, String remoteFilePath) throws Exception {
+    public void uploadFile(String filePath, String remoteFilePath) {
         uploadFile(fYunFileConfig.getBucket(), filePath, remoteFilePath);
     }
 
     @Override
-    public void uploadFile(String filePath, String remoteFilePath, Map<String, String> headers) throws Exception {
+    public void uploadFile(String filePath, String remoteFilePath, Map<String, String> headers) {
         uploadFile(fYunFileConfig.getBucket(), filePath, remoteFilePath, headers);
     }
 
     @Override
-    public void uploadFileByCommand(String filePath, String remoteFilePath) throws Exception {
+    public void uploadFileByCommand(String filePath, String remoteFilePath) {
         uploadFileByCommand(fYunFileConfig.getBucket(), filePath, remoteFilePath);
     }
 
@@ -40,50 +40,50 @@ public abstract class AbstractFYunFileService implements FYunFileServiceInterfac
     }
 
     @Override
-    public void deleteFolder(String remoteFolderPath) throws Exception {
+    public void deleteFolder(String remoteFolderPath) {
         deleteFolder(fYunFileConfig.getBucket(), remoteFolderPath);
     }
 
     @Override
-    public void uploadMulFiles(Map<String, String> filepaths) throws Exception {
+    public void uploadMulFiles(Map<String, String> filepaths) {
         uploadMulFiles(fYunFileConfig.getBucket(), filepaths);
     }
 
     @Override
-    public List<String> listRemoteFiles(String sourcePath) throws Exception {
+    public List<String> listRemoteFiles(String sourcePath) {
         return listRemoteFiles(fYunFileConfig.getBucket(), sourcePath);
     }
 
-    public void copyFileInBucket(String sourcePath, String targetPath) throws Exception {
+    public void copyFileInBucket(String sourcePath, String targetPath) {
         copyFileBetweenBucket(fYunFileConfig.getBucket(), sourcePath, fYunFileConfig.getBucket(), targetPath);
     }
 
-    public void copyFileInBucket(String bucket, String sourcePath, String targetPath) throws Exception {
+    public void copyFileInBucket(String bucket, String sourcePath, String targetPath) {
         copyFileBetweenBucket(bucket, sourcePath, bucket, targetPath);
     }
 
     @Override
-    public void copyFileBetweenBucket(String sourcePath, String targetBucketName, String targetPath) throws Exception {
+    public void copyFileBetweenBucket(String sourcePath, String targetBucketName, String targetPath) {
         copyFileBetweenBucket(fYunFileConfig.getBucket(), sourcePath, targetBucketName, targetPath);
     }
 
     @Override
-    public void copyFilesBetweenBucket(String targetBucketName, Map<String, String> pathMap) throws Exception {
+    public void copyFilesBetweenBucket(String targetBucketName, Map<String, String> pathMap) {
         copyFilesBetweenBucket(fYunFileConfig.getBucket(), targetBucketName, pathMap);
     }
 
     @Override
-    public String getFileContent(String remoteFilePath) throws Exception {
+    public String getFileContent(String remoteFilePath) {
         return getFileContent(fYunFileConfig.getBucket(), remoteFilePath);
     }
 
     @Override
-    public boolean fileExist(String objectName) throws Exception {
+    public boolean fileExist(String objectName) {
         return fileExist(fYunFileConfig.getBucket(), objectName);
     }
 
     @Override
-    public void downloadFile(String remoteFilePath, String localPath) throws Exception {
+    public void downloadFile(String remoteFilePath, String localPath) {
         downloadFile(fYunFileConfig.getBucket(), remoteFilePath, localPath);
     }
 }

+ 37 - 37
4dkankan-utils-fyun-parent/src/main/java/com/fdkankan/fyun/face/FYunFileServiceInterface.java

@@ -15,18 +15,18 @@ public interface FYunFileServiceInterface {
      * @param bucket         目标bucket
      * @param data           上传的数据
      * @param remoteFilePath 上传后的文件路径
-     * @throws Exception
+     * @
      */
-    void uploadFile(String bucket, byte[] data, String remoteFilePath) throws Exception;
+    void uploadFile(String bucket, byte[] data, String remoteFilePath) ;
 
     /**
      * 上传文件至系统默认bucket
      *
      * @param data           上传的数据
      * @param remoteFilePath 上传后的文件路径
-     * @throws Exception
+     * @
      */
-    void uploadFile(byte[] data, String remoteFilePath) throws Exception;
+    void uploadFile(byte[] data, String remoteFilePath) ;
 
     /**
      * 上传本地文件
@@ -34,18 +34,18 @@ public interface FYunFileServiceInterface {
      * @param bucket         目标bucket
      * @param filePath       本地路径
      * @param remoteFilePath 上传后的文件路径
-     * @throws Exception
+     * @
      */
-    void uploadFile(String bucket, String filePath, String remoteFilePath) throws Exception;
+    void uploadFile(String bucket, String filePath, String remoteFilePath) ;
 
     /**
      * 上传本地文件至系统默认bucket
      *
      * @param filePath       本地路径
      * @param remoteFilePath 上传后的文件路径
-     * @throws Exception
+     * @
      */
-    void uploadFile(String filePath, String remoteFilePath) throws Exception;
+    void uploadFile(String filePath, String remoteFilePath) ;
 
     /**
      * 上传本地文件
@@ -53,18 +53,18 @@ public interface FYunFileServiceInterface {
      * @param bucket         目标bucket
      * @param filePath       本地路径
      * @param remoteFilePath 上传后的文件路径
-     * @throws Exception
+     * @
      */
-    void uploadFile(String bucket, String filePath, String remoteFilePath, Map<String, String> headers) throws Exception;
+    void uploadFile(String bucket, String filePath, String remoteFilePath, Map<String, String> headers) ;
 
     /**
      * 上传本地文件至系统默认bucket
      *
      * @param filePath       本地路径
      * @param remoteFilePath 上传后的文件路径
-     * @throws Exception
+     * @
      */
-    void uploadFile(String filePath, String remoteFilePath, Map<String, String> headers) throws Exception;
+    void uploadFile(String filePath, String remoteFilePath, Map<String, String> headers) ;
 
     /**
      * 通过本地脚本上传
@@ -72,7 +72,7 @@ public interface FYunFileServiceInterface {
      * @param filePath
      * @param remoteFilePath
      */
-    void uploadFileByCommand(String bucket, String filePath, String remoteFilePath) throws Exception;
+    void uploadFileByCommand(String bucket, String filePath, String remoteFilePath) ;
 
     /**
      * 通过本地脚本上传至系统默认bucket
@@ -80,7 +80,7 @@ public interface FYunFileServiceInterface {
      * @param filePath
      * @param remoteFilePath
      */
-    void uploadFileByCommand(String filePath, String remoteFilePath) throws Exception;
+    void uploadFileByCommand(String filePath, String remoteFilePath) ;
 
     /**
      * 删除服务器文件
@@ -106,7 +106,7 @@ public interface FYunFileServiceInterface {
      * @param remoteFolderPath
      * @return
      */
-    void deleteFolder(String bucket, String remoteFolderPath) throws Exception;
+    void deleteFolder(String bucket, String remoteFolderPath) ;
 
     /**
      * 删除系统默认bucket目录
@@ -114,7 +114,7 @@ public interface FYunFileServiceInterface {
      * @param remoteFolderPath
      * @return
      */
-    void deleteFolder(String remoteFolderPath) throws Exception;
+    void deleteFolder(String remoteFolderPath) ;
 
 
     /**
@@ -122,17 +122,17 @@ public interface FYunFileServiceInterface {
      *
      * @param bucket
      * @param filepaths :key 本地路径,value,服务器文件路径
-     * @throws Exception
+     * @
      */
-    void uploadMulFiles(String bucket, Map<String, String> filepaths) throws Exception;
+    void uploadMulFiles(String bucket, Map<String, String> filepaths) ;
 
     /**
      * 上传多个文件至系统默认bucket
      *
      * @param filepaths :key 本地路径,value,服务器文件路径
-     * @throws Exception
+     * @
      */
-    void uploadMulFiles(Map<String, String> filepaths) throws Exception;
+    void uploadMulFiles(Map<String, String> filepaths) ;
 
 
     /**
@@ -141,18 +141,18 @@ public interface FYunFileServiceInterface {
      * @param bucket
      * @param sourcePath
      * @return
-     * @throws Exception
+     * @
      */
-    List<String> listRemoteFiles(String bucket, String sourcePath) throws Exception;
+    List<String> listRemoteFiles(String bucket, String sourcePath) ;
 
     /**
      * 获取默认bucket文件列表
      *
      * @param sourcePath
      * @return
-     * @throws Exception
+     * @
      */
-    List<String> listRemoteFiles(String sourcePath) throws Exception;
+    List<String> listRemoteFiles(String sourcePath) ;
 
 
     /**
@@ -163,7 +163,7 @@ public interface FYunFileServiceInterface {
      * @author dengsixing
      * @date 2022/1/18
      **/
-    void copyFileInBucket(String bucket, String sourcePath, String targetPath) throws Exception;
+    void copyFileInBucket(String bucket, String sourcePath, String targetPath) ;
 
     /**
      * 在默认bucket 内拷贝文件
@@ -172,7 +172,7 @@ public interface FYunFileServiceInterface {
      * @author dengsixing
      * @date 2022/1/18
      **/
-    void copyFileInBucket(String sourcePath, String targetPath) throws Exception;
+    void copyFileInBucket(String sourcePath, String targetPath) ;
 
     /**
      * <p>
@@ -184,7 +184,7 @@ public interface FYunFileServiceInterface {
      * @author dengsixing
      * @date 2022/1/18
      **/
-    void copyFileBetweenBucket(String sourceBucketName, String sourcePath, String targetBucketName, String targetPath) throws Exception;
+    void copyFileBetweenBucket(String sourceBucketName, String sourcePath, String targetBucketName, String targetPath) ;
 
     /**
      * <p>
@@ -196,7 +196,7 @@ public interface FYunFileServiceInterface {
      * @author dengsixing
      * @date 2022/1/18
      **/
-    void copyFileBetweenBucket(String sourcePath, String targetBucketName, String targetPath) throws Exception;
+    void copyFileBetweenBucket(String sourcePath, String targetBucketName, String targetPath) ;
 
     /**
      * <p>
@@ -208,7 +208,7 @@ public interface FYunFileServiceInterface {
      * @author dengsixing
      * @date 2022/1/18
      **/
-    void copyFilesBetweenBucket(String sourceBucketName, String targetBucketName, Map<String, String> pathMap) throws Exception;
+    void copyFilesBetweenBucket(String sourceBucketName, String targetBucketName, Map<String, String> pathMap) ;
 
     /**
      * <p>
@@ -220,7 +220,7 @@ public interface FYunFileServiceInterface {
      * @author dengsixing
      * @date 2022/1/18
      **/
-    void copyFilesBetweenBucket(String targetBucketName, Map<String, String> pathMap) throws Exception;
+    void copyFilesBetweenBucket(String targetBucketName, Map<String, String> pathMap) ;
 
 
     /**
@@ -230,7 +230,7 @@ public interface FYunFileServiceInterface {
      * @param remoteFilePath
      * @return
      */
-    String getFileContent(String bucketName, String remoteFilePath) throws Exception;
+    String getFileContent(String bucketName, String remoteFilePath) ;
 
     /**
      * 获取默认bucket内容
@@ -238,7 +238,7 @@ public interface FYunFileServiceInterface {
      * @param remoteFilePath
      * @return
      */
-    String getFileContent(String remoteFilePath) throws Exception;
+    String getFileContent(String remoteFilePath) ;
 
 
     /**
@@ -247,7 +247,7 @@ public interface FYunFileServiceInterface {
      * @param objectName
      * @return
      */
-    boolean fileExist(String bucket, String objectName) throws Exception;
+    boolean fileExist(String bucket, String objectName) ;
 
     /**
      * 判断默认bucket文件是否存在
@@ -255,7 +255,7 @@ public interface FYunFileServiceInterface {
      * @param objectName
      * @return
      */
-    boolean fileExist(String objectName) throws Exception;
+    boolean fileExist(String objectName) ;
 
     /**
      * 从指定bucket下载文件
@@ -265,14 +265,14 @@ public interface FYunFileServiceInterface {
      * @param localPath
      * @return
      */
-    public void downloadFile(String bucket, String remoteFilePath, String localPath) throws Exception;
+    public void downloadFile(String bucket, String remoteFilePath, String localPath) ;
 
     /**
      * 从系统默认bucket下载文件
      *
      * @param remoteFilePath
      * @param localPath
-     * @throws Exception
+     * @
      */
-    public void downloadFile(String remoteFilePath, String localPath) throws Exception;
+    public void downloadFile(String remoteFilePath, String localPath) ;
 }

+ 16 - 16
4dkankan-utils-fyun-s3/src/main/java/com/fdkankan/fyun/s3/S3FileService.java

@@ -28,7 +28,7 @@ public class S3FileService extends AbstractFYunFileService {
     private AmazonS3 s3;
 
     @Override
-    public void uploadFile(String bucket, byte[] data, String remoteFilePath) throws Exception {
+    public void uploadFile(String bucket, byte[] data, String remoteFilePath){
         try {
             ObjectMetadata metadata = new ObjectMetadata();
             PutObjectRequest request = new PutObjectRequest(bucket, remoteFilePath, new ByteArrayInputStream(data), metadata);
@@ -44,16 +44,16 @@ public class S3FileService extends AbstractFYunFileService {
     }
 
     @Override
-    public void uploadFile(String bucket, String filePath, String remoteFilePath) throws Exception {
+    public void uploadFile(String bucket, String filePath, String remoteFilePath){
         uploadFile(bucket, filePath, remoteFilePath,true,null);
     }
 
     @Override
-    public void uploadFile(String bucket, String filePath, String remoteFilePath, Map<String, String> headers) throws Exception {
+    public void uploadFile(String bucket, String filePath, String remoteFilePath, Map<String, String> headers){
         uploadFile(bucket, filePath, remoteFilePath,true,headers);
     }
 
-    private void uploadFile(String bucket, String filePath, String remoteFilePath, Boolean shutdown,Map<String, String> headers) throws Exception {
+    private void uploadFile(String bucket, String filePath, String remoteFilePath, Boolean shutdown,Map<String, String> headers){
         try {
             File file = new File(filePath);
             if (!file.exists()) {
@@ -93,7 +93,7 @@ public class S3FileService extends AbstractFYunFileService {
     }
 
     @Override
-    public void uploadFileByCommand(String bucket, String filePath, String remoteFilePath) throws Exception {
+    public void uploadFileByCommand(String bucket, String filePath, String remoteFilePath){
         String ossPath = bucket + "/" + remoteFilePath;
         try {
             String command = String.format(FYunConstants.UPLOAD_SH, ossPath, filePath);
@@ -106,7 +106,7 @@ public class S3FileService extends AbstractFYunFileService {
     }
 
     @Override
-    public void deleteFile(String bucket, String remoteFilePath) throws IOException {
+    public void deleteFile(String bucket, String remoteFilePath){
         if (remoteFilePath.startsWith("/")) {
             remoteFilePath = remoteFilePath.substring(1);
         }
@@ -122,7 +122,7 @@ public class S3FileService extends AbstractFYunFileService {
     }
 
     @Override
-    public void deleteFolder(String bucket, String remoteFolderPath) throws Exception {
+    public void deleteFolder(String bucket, String remoteFolderPath){
         try {
             int maxKeys = 200;
             String nextMaker = null;
@@ -156,7 +156,7 @@ public class S3FileService extends AbstractFYunFileService {
     }
 
     @Override
-    public void uploadMulFiles(String bucket, Map<String, String> filepaths) throws Exception {
+    public void uploadMulFiles(String bucket, Map<String, String> filepaths){
         try {
             for (Map.Entry<String, String> entry : filepaths.entrySet()) {
                 uploadFile(bucket, entry.getKey(), entry.getValue(), false,null);
@@ -171,11 +171,11 @@ public class S3FileService extends AbstractFYunFileService {
     }
 
     @Override
-    public List<String> listRemoteFiles(String bucket, String sourcePath) throws Exception {
+    public List<String> listRemoteFiles(String bucket, String sourcePath){
         return listRemoteFiles(bucket, sourcePath, true);
     }
 
-    private List<String> listRemoteFiles(String bucket, String sourcePath, Boolean shutdown) throws Exception {
+    private List<String> listRemoteFiles(String bucket, String sourcePath, Boolean shutdown) {
         List<String> keyList = new ArrayList<>();
         try {
             boolean flag = true;
@@ -208,11 +208,11 @@ public class S3FileService extends AbstractFYunFileService {
     }
 
     @Override
-    public void copyFileBetweenBucket(String sourceBucketName, String sourcePath, String targetBucketName, String targetPath) throws Exception {
+    public void copyFileBetweenBucket(String sourceBucketName, String sourcePath, String targetBucketName, String targetPath){
         copyFileBetweenBucket(sourceBucketName, sourcePath, targetBucketName, targetPath, true);
     }
 
-    private void copyFileBetweenBucket(String sourceBucketName, String sourcePath, String targetBucketName, String targetPath, Boolean shutdown) throws Exception {
+    private void copyFileBetweenBucket(String sourceBucketName, String sourcePath, String targetBucketName, String targetPath, Boolean shutdown){
         try {
             List<String> files = listRemoteFiles(sourceBucketName, sourcePath, false);
             if (ObjectUtils.isEmpty(files)) {
@@ -233,7 +233,7 @@ public class S3FileService extends AbstractFYunFileService {
     }
 
     @Override
-    public void copyFilesBetweenBucket(String sourceBucketName, String targetBucketName, Map<String, String> pathMap) throws Exception {
+    public void copyFilesBetweenBucket(String sourceBucketName, String targetBucketName, Map<String, String> pathMap){
         if (ObjectUtils.isEmpty(pathMap)) {
             return;
         }
@@ -251,7 +251,7 @@ public class S3FileService extends AbstractFYunFileService {
     }
 
     @Override
-    public String getFileContent(String bucketName, String remoteFilePath) throws Exception {
+    public String getFileContent(String bucketName, String remoteFilePath){
         try {
 			GetObjectRequest request  = new GetObjectRequest(bucketName,remoteFilePath);
 			S3Object object = s3.getObject(request);
@@ -278,7 +278,7 @@ public class S3FileService extends AbstractFYunFileService {
     }
 
     @Override
-    public boolean fileExist(String bucket, String objectName) throws Exception {
+    public boolean fileExist(String bucket, String objectName) {
         try {
             return s3.doesObjectExist(bucket, objectName);
         } catch (Exception e) {
@@ -292,7 +292,7 @@ public class S3FileService extends AbstractFYunFileService {
     }
 
     @Override
-    public void downloadFile(String bucket, String remoteFilePath, String localPath) throws Exception {
+    public void downloadFile(String bucket, String remoteFilePath, String localPath) {
         try {
             File localFile = new File(localPath);
             if (!localFile.getParentFile().exists()) {