UpyunService.java 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. package cn.com.qmth.examcloud.web.upyun;
  2. import java.io.File;
  3. import java.io.InputStream;
  4. /**
  5. * 又拍云 服务
  6. *
  7. * @author WANGWEI
  8. * @date 2018年6月29日
  9. * @Copyright (c) 2018-? http://qmth.com.cn All Rights Reserved.
  10. */
  11. public interface UpyunService {
  12. /**
  13. * 写文件
  14. *
  15. * @author WANGWEI
  16. * @param siteId
  17. * @param env
  18. * @param in
  19. * @param md5
  20. * @return
  21. */
  22. UpYunPathInfo writeFile(String siteId, UpyunPathEnvironmentInfo env, InputStream in,
  23. String md5);
  24. /**
  25. * 写文件
  26. *
  27. * @author WANGWEI
  28. * @param siteId
  29. * @param env
  30. * @param file
  31. * @param withMd5
  32. * @return
  33. */
  34. UpYunPathInfo writeFile(String siteId, UpyunPathEnvironmentInfo env, File file,
  35. boolean withMd5);
  36. /**
  37. * 删除文件
  38. *
  39. * @author WANGWEI
  40. * @param siteId
  41. * @param filePath
  42. */
  43. void delete(String siteId, String filePath);
  44. /**
  45. * 创建http请求
  46. *
  47. * @author WANGWEI
  48. * @param filePath
  49. * @param withMd5
  50. * @return
  51. */
  52. UpYunHttpRequest buildUpYunHttpRequest(String siteId, UpyunPathEnvironmentInfo env, String md5);
  53. }