Class Y9FileStoreServiceImpl
- java.lang.Object
-
- net.risesoft.y9public.service.impl.Y9FileStoreServiceImpl
-
- All Implemented Interfaces:
Y9FileStoreService
@Service("y9FileStoreService") @Transactional(rollbackFor=java.lang.Exception.class, transactionManager="rsPublicTransactionManager") public class Y9FileStoreServiceImpl extends Object implements Y9FileStoreService- Author:
- dingzhaojun, qinman, mengjuhua, shidaobang
-
-
Constructor Summary
Constructors Constructor Description Y9FileStoreServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleandeleteFile(String id)byte[]downloadFileToBytes(String id)voiddownloadFileToOutputStream(String id, OutputStream outputStream)StringdownloadFileToString(String id)Y9FileStoregetById(String y9FileStoreId)voidinit()Y9FileStoreuploadFile(byte[] bytes, String customPath, String fileName)Y9FileStoreuploadFile(File file, String customPath, String fileName)Y9FileStoreuploadFile(InputStream inputStream, String customPath, String fileName)Y9FileStoreuploadFile(org.springframework.web.multipart.MultipartFile multipartFile, String customPath, String fileName)Y9FileStoreuploadFileAsync(byte[] bytes, String customPath, String fileName)Y9FileStoreuploadFileAsync(File file, String customPath, String fileName)Y9FileStoreuploadFileAsync(InputStream inputStream, String customPath, String fileName)Y9FileStoreuploadFileAsync(org.springframework.web.multipart.MultipartFile multipartFile, String customPath, String fileName)Y9FileStoreuploadFileReplace(byte[] bytes, String y9FileStoreId)Y9FileStoreuploadFileReplace(File file, String y9FileStoreId)Y9FileStoreuploadFileReplace(InputStream inputStream, String y9FileStoreId)Y9FileStoreuploadFileReplace(org.springframework.web.multipart.MultipartFile multipartFile, String y9FileStoreId)
-
-
-
Method Detail
-
deleteFile
public boolean deleteFile(String id)
- Specified by:
deleteFilein interfaceY9FileStoreService
-
downloadFileToBytes
public byte[] downloadFileToBytes(String id) throws Exception
- Specified by:
downloadFileToBytesin interfaceY9FileStoreService- Throws:
Exception
-
downloadFileToOutputStream
public void downloadFileToOutputStream(String id, OutputStream outputStream) throws Exception
- Specified by:
downloadFileToOutputStreamin interfaceY9FileStoreService- Throws:
Exception
-
downloadFileToString
public String downloadFileToString(String id) throws Exception
- Specified by:
downloadFileToStringin interfaceY9FileStoreService- Throws:
Exception
-
getById
public Y9FileStore getById(String y9FileStoreId)
- Specified by:
getByIdin interfaceY9FileStoreService
-
init
@PostConstruct public void init()
-
uploadFile
public Y9FileStore uploadFile(byte[] bytes, String customPath, String fileName) throws Exception
- Specified by:
uploadFilein interfaceY9FileStoreService- Throws:
Exception
-
uploadFile
public Y9FileStore uploadFile(File file, String customPath, String fileName) throws Exception
- Specified by:
uploadFilein interfaceY9FileStoreService- Throws:
Exception
-
uploadFile
public Y9FileStore uploadFile(InputStream inputStream, String customPath, String fileName) throws Exception
- Specified by:
uploadFilein interfaceY9FileStoreService- Throws:
Exception
-
uploadFile
public Y9FileStore uploadFile(org.springframework.web.multipart.MultipartFile multipartFile, String customPath, String fileName) throws Exception
- Specified by:
uploadFilein interfaceY9FileStoreService- Throws:
Exception
-
uploadFileAsync
public Y9FileStore uploadFileAsync(byte[] bytes, String customPath, String fileName) throws Exception
- Specified by:
uploadFileAsyncin interfaceY9FileStoreService- Throws:
Exception
-
uploadFileAsync
public Y9FileStore uploadFileAsync(File file, String customPath, String fileName) throws Exception
- Specified by:
uploadFileAsyncin interfaceY9FileStoreService- Throws:
Exception
-
uploadFileAsync
public Y9FileStore uploadFileAsync(InputStream inputStream, String customPath, String fileName) throws Exception
- Specified by:
uploadFileAsyncin interfaceY9FileStoreService- Throws:
Exception
-
uploadFileAsync
public Y9FileStore uploadFileAsync(org.springframework.web.multipart.MultipartFile multipartFile, String customPath, String fileName) throws Exception
- Specified by:
uploadFileAsyncin interfaceY9FileStoreService- Throws:
Exception
-
uploadFileReplace
public Y9FileStore uploadFileReplace(byte[] bytes, String y9FileStoreId) throws Exception
- Specified by:
uploadFileReplacein interfaceY9FileStoreService- Throws:
Exception
-
uploadFileReplace
public Y9FileStore uploadFileReplace(File file, String y9FileStoreId) throws Exception
- Specified by:
uploadFileReplacein interfaceY9FileStoreService- Throws:
Exception
-
uploadFileReplace
public Y9FileStore uploadFileReplace(InputStream inputStream, String y9FileStoreId) throws Exception
- Specified by:
uploadFileReplacein interfaceY9FileStoreService- Throws:
Exception
-
uploadFileReplace
public Y9FileStore uploadFileReplace(org.springframework.web.multipart.MultipartFile multipartFile, String y9FileStoreId) throws Exception
- Specified by:
uploadFileReplacein interfaceY9FileStoreService- Throws:
Exception
-
-