Class ContainerPath

java.lang.Object
org.ofdrw.crypto.ContainerPath

public class ContainerPath extends Object
文件在容器中的路径
Since:
2021-07-15 18:57:45
Author:
权观宇
  • Constructor Details

    • ContainerPath

      public ContainerPath(String path, Path abs)
      创建 文件在容器中的路径
      Parameters:
      path - 容器内绝对路径
      abs - 文件系统内绝对路径
  • Method Details

    • getPath

      public String getPath()
    • getAbs

      public Path getAbs()
    • createEncryptedFile

      public ContainerPath createEncryptedFile() throws IOException
      创建加密后的文件路径(空)

      输出加密文件命名规则 原文件名全小写 + .dat 后缀,如果重复,那么在文件名后面增加后缀

      Returns:
      创建加密后输出文件
      Throws:
      IOException - 文件操作异常
    • newDatFile

      public static ContainerPath newDatFile(String cAbs, Path parent) throws IOException
      创建 后缀为.dat 的文件

      加密文件为 原文件 后缀改为 .dat 若文件存在,则在文件名后追加下滑线序号 _N

      Parameters:
      cAbs - 容器内绝对路径
      parent - 生成的加密文件存储目录
      Returns:
      容器路径对象
      Throws:
      IOException - 文件操作异常