Skip to content
Permalink
Browse files

uploaded to Maven central

  • Loading branch information...
pheyse committed Sep 24, 2019
1 parent a8f4f13 commit 915b9a854b183dca3d9ec44aa296c9319025dc25
Showing with 43,073 additions and 85 deletions.
  1. +11 −0 README.md
  2. +112 −22 pom.xml
  3. +2 −1 src/main/java/de/bright_side/filesystemfacade/databasefs/DatabaseFSConfig.java
  4. +32 −13 src/main/java/de/bright_side/filesystemfacade/encryptedfs/EncryptedFS.java
  5. +46 −25 src/main/java/de/bright_side/filesystemfacade/facade/FSFFile.java
  6. +8 −3 src/main/java/de/bright_side/filesystemfacade/historyfs/HistoryFS.java
  7. +5 −4 src/main/java/de/bright_side/filesystemfacade/historyfs/HistoryFile.java
  8. +6 −6 src/main/java/de/bright_side/filesystemfacade/remotefs/RemoteFSUtil.java
  9. +5 −5 src/main/java/de/bright_side/filesystemfacade/subdirfs/SubDirFS.java
  10. +24 −6 src/main/java/de/bright_side/filesystemfacade/util/FSFFileUtil.java
  11. +59 −0 target/apidocs/allclasses-frame.html
  12. +59 −0 target/apidocs/allclasses-noframe.html
  13. +449 −0 target/apidocs/constant-values.html
  14. +440 −0 target/apidocs/de/bright_side/filesystemfacade/databasefs/DatabaseFS.html
  15. +596 −0 target/apidocs/de/bright_side/filesystemfacade/databasefs/DatabaseFSConfig.html
  16. +732 −0 target/apidocs/de/bright_side/filesystemfacade/databasefs/DatabaseFSUtil.html
  17. +1,439 −0 target/apidocs/de/bright_side/filesystemfacade/databasefs/DatabaseFile.html
  18. +232 −0 target/apidocs/de/bright_side/filesystemfacade/databasefs/ResultSetProcessor.html
  19. +180 −0 target/apidocs/de/bright_side/filesystemfacade/databasefs/class-use/DatabaseFS.html
  20. +328 −0 target/apidocs/de/bright_side/filesystemfacade/databasefs/class-use/DatabaseFSConfig.html
  21. +126 −0 target/apidocs/de/bright_side/filesystemfacade/databasefs/class-use/DatabaseFSUtil.html
  22. +203 −0 target/apidocs/de/bright_side/filesystemfacade/databasefs/class-use/DatabaseFile.html
  23. +179 −0 target/apidocs/de/bright_side/filesystemfacade/databasefs/class-use/ResultSetProcessor.html
  24. +28 −0 target/apidocs/de/bright_side/filesystemfacade/databasefs/package-frame.html
  25. +173 −0 target/apidocs/de/bright_side/filesystemfacade/databasefs/package-summary.html
  26. +146 −0 target/apidocs/de/bright_side/filesystemfacade/databasefs/package-tree.html
  27. +170 −0 target/apidocs/de/bright_side/filesystemfacade/databasefs/package-use.html
  28. +790 −0 target/apidocs/de/bright_side/filesystemfacade/encryptedfs/EncryptedFS.html
  29. +1,274 −0 target/apidocs/de/bright_side/filesystemfacade/encryptedfs/EncryptedFile.html
  30. +170 −0 target/apidocs/de/bright_side/filesystemfacade/encryptedfs/class-use/EncryptedFS.html
  31. +184 −0 target/apidocs/de/bright_side/filesystemfacade/encryptedfs/class-use/EncryptedFile.html
  32. +22 −0 target/apidocs/de/bright_side/filesystemfacade/encryptedfs/package-frame.html
  33. +151 −0 target/apidocs/de/bright_side/filesystemfacade/encryptedfs/package-summary.html
  34. +144 −0 target/apidocs/de/bright_side/filesystemfacade/encryptedfs/package-tree.html
  35. +165 −0 target/apidocs/de/bright_side/filesystemfacade/encryptedfs/package-use.html
  36. +231 −0 target/apidocs/de/bright_side/filesystemfacade/facade/FSFEnvironment.html
  37. +1,182 −0 target/apidocs/de/bright_side/filesystemfacade/facade/FSFFile.html
  38. +1,404 −0 target/apidocs/de/bright_side/filesystemfacade/facade/FSFFileWithInnerFile.html
  39. +262 −0 target/apidocs/de/bright_side/filesystemfacade/facade/FSFSystem.html
  40. +266 −0 target/apidocs/de/bright_side/filesystemfacade/facade/IllegalPathItemNameException.html
  41. +322 −0 target/apidocs/de/bright_side/filesystemfacade/facade/VersionedData.html
  42. +266 −0 target/apidocs/de/bright_side/filesystemfacade/facade/WrongVersionException.html
  43. +387 −0 target/apidocs/de/bright_side/filesystemfacade/facade/class-use/FSFEnvironment.html
  44. +1,434 −0 target/apidocs/de/bright_side/filesystemfacade/facade/class-use/FSFFile.html
  45. +210 −0 target/apidocs/de/bright_side/filesystemfacade/facade/class-use/FSFFileWithInnerFile.html
  46. +531 −0 target/apidocs/de/bright_side/filesystemfacade/facade/class-use/FSFSystem.html
  47. +126 −0 target/apidocs/de/bright_side/filesystemfacade/facade/class-use/IllegalPathItemNameException.html
  48. +394 −0 target/apidocs/de/bright_side/filesystemfacade/facade/class-use/VersionedData.html
  49. +446 −0 target/apidocs/de/bright_side/filesystemfacade/facade/class-use/WrongVersionException.html
  50. +33 −0 target/apidocs/de/bright_side/filesystemfacade/facade/package-frame.html
  51. +190 −0 target/apidocs/de/bright_side/filesystemfacade/facade/package-summary.html
  52. +160 −0 target/apidocs/de/bright_side/filesystemfacade/facade/package-tree.html
  53. +407 −0 target/apidocs/de/bright_side/filesystemfacade/facade/package-use.html
  54. +603 −0 target/apidocs/de/bright_side/filesystemfacade/historyfs/HistoryFS.html
  55. +1,149 −0 target/apidocs/de/bright_side/filesystemfacade/historyfs/HistoryFile.html
  56. +165 −0 target/apidocs/de/bright_side/filesystemfacade/historyfs/class-use/HistoryFS.html
  57. +166 −0 target/apidocs/de/bright_side/filesystemfacade/historyfs/class-use/HistoryFile.html
  58. +22 −0 target/apidocs/de/bright_side/filesystemfacade/historyfs/package-frame.html
  59. +148 −0 target/apidocs/de/bright_side/filesystemfacade/historyfs/package-summary.html
  60. +144 −0 target/apidocs/de/bright_side/filesystemfacade/historyfs/package-tree.html
  61. +162 −0 target/apidocs/de/bright_side/filesystemfacade/historyfs/package-use.html
  62. +480 −0 target/apidocs/de/bright_side/filesystemfacade/memoryfs/MemoryFS.html
  63. +402 −0 target/apidocs/de/bright_side/filesystemfacade/memoryfs/MemoryFSItem.html
  64. +328 −0 target/apidocs/de/bright_side/filesystemfacade/memoryfs/MemoryFSUtil.html
  65. +1,359 −0 target/apidocs/de/bright_side/filesystemfacade/memoryfs/MemoryFile.html
  66. +375 −0 target/apidocs/de/bright_side/filesystemfacade/memoryfs/MemoryFileOutputStream.html
  67. +197 −0 target/apidocs/de/bright_side/filesystemfacade/memoryfs/class-use/MemoryFS.html
  68. +218 −0 target/apidocs/de/bright_side/filesystemfacade/memoryfs/class-use/MemoryFSItem.html
  69. +126 −0 target/apidocs/de/bright_side/filesystemfacade/memoryfs/class-use/MemoryFSUtil.html
  70. +126 −0 target/apidocs/de/bright_side/filesystemfacade/memoryfs/class-use/MemoryFile.html
  71. +126 −0 target/apidocs/de/bright_side/filesystemfacade/memoryfs/class-use/MemoryFileOutputStream.html
  72. +25 −0 target/apidocs/de/bright_side/filesystemfacade/memoryfs/package-frame.html
  73. +162 −0 target/apidocs/de/bright_side/filesystemfacade/memoryfs/package-summary.html
  74. +147 −0 target/apidocs/de/bright_side/filesystemfacade/memoryfs/package-tree.html
  75. +164 −0 target/apidocs/de/bright_side/filesystemfacade/memoryfs/package-use.html
  76. +320 −0 target/apidocs/de/bright_side/filesystemfacade/nativefs/NativeFS.html
  77. +1,364 −0 target/apidocs/de/bright_side/filesystemfacade/nativefs/NativeFile.html
  78. +126 −0 target/apidocs/de/bright_side/filesystemfacade/nativefs/class-use/NativeFS.html
  79. +126 −0 target/apidocs/de/bright_side/filesystemfacade/nativefs/class-use/NativeFile.html
  80. +22 −0 target/apidocs/de/bright_side/filesystemfacade/nativefs/package-frame.html
  81. +148 −0 target/apidocs/de/bright_side/filesystemfacade/nativefs/package-summary.html
  82. +140 −0 target/apidocs/de/bright_side/filesystemfacade/nativefs/package-tree.html
  83. +126 −0 target/apidocs/de/bright_side/filesystemfacade/nativefs/package-use.html
  84. +899 −0 target/apidocs/de/bright_side/filesystemfacade/remotefs/RemoteFS.html
  85. +381 −0 target/apidocs/de/bright_side/filesystemfacade/remotefs/RemoteFSAuthenticationException.html
  86. +267 −0 target/apidocs/de/bright_side/filesystemfacade/remotefs/RemoteFSConnectionProvider.html
  87. +240 −0 target/apidocs/de/bright_side/filesystemfacade/remotefs/RemoteFSFSystemProvider.html
  88. +266 −0 target/apidocs/de/bright_side/filesystemfacade/remotefs/RemoteFSRemoteException.html
  89. +374 −0 target/apidocs/de/bright_side/filesystemfacade/remotefs/RemoteFSRequest.html
  90. +286 −0 target/apidocs/de/bright_side/filesystemfacade/remotefs/RemoteFSResponder.html
  91. +541 −0 target/apidocs/de/bright_side/filesystemfacade/remotefs/RemoteFSResponse.html
  92. +331 −0 target/apidocs/de/bright_side/filesystemfacade/remotefs/RemoteFSServletConnectionProvider.html
  93. +414 −0 target/apidocs/de/bright_side/filesystemfacade/remotefs/RemoteFSUtil.html
  94. +1,384 −0 target/apidocs/de/bright_side/filesystemfacade/remotefs/RemoteFile.html
  95. +188 −0 target/apidocs/de/bright_side/filesystemfacade/remotefs/class-use/RemoteFS.html
  96. +176 −0 ...t/apidocs/de/bright_side/filesystemfacade/remotefs/class-use/RemoteFSAuthenticationException.html
  97. +208 −0 target/apidocs/de/bright_side/filesystemfacade/remotefs/class-use/RemoteFSConnectionProvider.html
  98. +168 −0 target/apidocs/de/bright_side/filesystemfacade/remotefs/class-use/RemoteFSFSystemProvider.html
  99. +169 −0 target/apidocs/de/bright_side/filesystemfacade/remotefs/class-use/RemoteFSRemoteException.html
  100. +168 −0 target/apidocs/de/bright_side/filesystemfacade/remotefs/class-use/RemoteFSRequest.html
  101. +126 −0 target/apidocs/de/bright_side/filesystemfacade/remotefs/class-use/RemoteFSResponder.html
  102. +199 −0 target/apidocs/de/bright_side/filesystemfacade/remotefs/class-use/RemoteFSResponse.html
  103. +126 −0 ...apidocs/de/bright_side/filesystemfacade/remotefs/class-use/RemoteFSServletConnectionProvider.html
  104. +126 −0 target/apidocs/de/bright_side/filesystemfacade/remotefs/class-use/RemoteFSUtil.html
  105. +126 −0 target/apidocs/de/bright_side/filesystemfacade/remotefs/class-use/RemoteFile.html
  106. +37 −0 target/apidocs/de/bright_side/filesystemfacade/remotefs/package-frame.html
  107. +206 −0 target/apidocs/de/bright_side/filesystemfacade/remotefs/package-summary.html
  108. +160 −0 target/apidocs/de/bright_side/filesystemfacade/remotefs/package-tree.html
  109. +177 −0 target/apidocs/de/bright_side/filesystemfacade/remotefs/package-use.html
  110. +461 −0 target/apidocs/de/bright_side/filesystemfacade/subdirfs/SubDirFS.html
  111. +437 −0 target/apidocs/de/bright_side/filesystemfacade/subdirfs/SubDirFile.html
  112. +165 −0 target/apidocs/de/bright_side/filesystemfacade/subdirfs/class-use/SubDirFS.html
  113. +126 −0 target/apidocs/de/bright_side/filesystemfacade/subdirfs/class-use/SubDirFile.html
  114. +22 −0 target/apidocs/de/bright_side/filesystemfacade/subdirfs/package-frame.html
  115. +151 −0 target/apidocs/de/bright_side/filesystemfacade/subdirfs/package-summary.html
  116. +144 −0 target/apidocs/de/bright_side/filesystemfacade/subdirfs/package-tree.html
  117. +162 −0 target/apidocs/de/bright_side/filesystemfacade/subdirfs/package-use.html
  118. +936 −0 target/apidocs/de/bright_side/filesystemfacade/util/FSFFileUtil.html
  119. +347 −0 target/apidocs/de/bright_side/filesystemfacade/util/ListDirFormatting.Style.html
  120. +387 −0 target/apidocs/de/bright_side/filesystemfacade/util/ListDirFormatting.html
  121. +299 −0 target/apidocs/de/bright_side/filesystemfacade/util/SimpleFSFEnvironment.html
  122. +126 −0 target/apidocs/de/bright_side/filesystemfacade/util/class-use/FSFFileUtil.html
  123. +192 −0 target/apidocs/de/bright_side/filesystemfacade/util/class-use/ListDirFormatting.Style.html
  124. +356 −0 target/apidocs/de/bright_side/filesystemfacade/util/class-use/ListDirFormatting.html
  125. +126 −0 target/apidocs/de/bright_side/filesystemfacade/util/class-use/SimpleFSFEnvironment.html
  126. +27 −0 target/apidocs/de/bright_side/filesystemfacade/util/package-frame.html
  127. +167 −0 target/apidocs/de/bright_side/filesystemfacade/util/package-summary.html
  128. +153 −0 target/apidocs/de/bright_side/filesystemfacade/util/package-tree.html
  129. +295 −0 target/apidocs/de/bright_side/filesystemfacade/util/package-use.html
  130. +126 −0 target/apidocs/deprecated-list.html
  131. +231 −0 target/apidocs/help-doc.html
  132. +1,761 −0 target/apidocs/index-all.html
  133. +76 −0 target/apidocs/index.html
  134. +30 −0 target/apidocs/overview-frame.html
  135. +172 −0 target/apidocs/overview-summary.html
  136. +219 −0 target/apidocs/overview-tree.html
  137. +9 −0 target/apidocs/package-list
  138. +30 −0 target/apidocs/script.js
  139. +194 −0 target/apidocs/serialized-form.html
  140. +574 −0 target/apidocs/stylesheet.css
  141. BIN target/filesystemfacade-2.6.0-javadoc.jar
  142. +11 −0 target/filesystemfacade-2.6.0-javadoc.jar.asc
  143. BIN target/filesystemfacade-2.6.0-sources.jar
  144. +11 −0 target/filesystemfacade-2.6.0-sources.jar.asc
  145. BIN target/filesystemfacade-2.6.0.jar
  146. +11 −0 target/filesystemfacade-2.6.0.jar.asc
  147. +195 −0 target/filesystemfacade-2.6.0.pom
  148. +11 −0 target/filesystemfacade-2.6.0.pom.asc
  149. +10 −0 target/javadoc-bundle-options/javadoc-options-javadoc-resources.xml
  150. +209 −0 target/javadoc-bundle-options/package-list
  151. +6 −0 target/nexus-staging/staging/dc29ae292d8d74.properties
  152. +7 −0 target/nexus-staging/staging/dc29ae292d8d74/.index
  153. BIN ...92d8d74/de/bright-side/filesystemfacade/filesystemfacade/2.6.0/filesystemfacade-2.6.0-javadoc.jar
  154. +11 −0 ...d74/de/bright-side/filesystemfacade/filesystemfacade/2.6.0/filesystemfacade-2.6.0-javadoc.jar.asc
  155. BIN ...92d8d74/de/bright-side/filesystemfacade/filesystemfacade/2.6.0/filesystemfacade-2.6.0-sources.jar
  156. +11 −0 ...d74/de/bright-side/filesystemfacade/filesystemfacade/2.6.0/filesystemfacade-2.6.0-sources.jar.asc
  157. BIN .../dc29ae292d8d74/de/bright-side/filesystemfacade/filesystemfacade/2.6.0/filesystemfacade-2.6.0.jar
  158. +11 −0 ...9ae292d8d74/de/bright-side/filesystemfacade/filesystemfacade/2.6.0/filesystemfacade-2.6.0.jar.asc
  159. +195 −0 .../dc29ae292d8d74/de/bright-side/filesystemfacade/filesystemfacade/2.6.0/filesystemfacade-2.6.0.pom
  160. +11 −0 ...9ae292d8d74/de/bright-side/filesystemfacade/filesystemfacade/2.6.0/filesystemfacade-2.6.0.pom.asc
  161. +12 −0 .../staging/dc29ae292d8d74/de/bright-side/filesystemfacade/filesystemfacade/maven-metadata-nexus.xml
@@ -89,6 +89,17 @@ public void static void main(String[] args){
}
```

## Including via Maven
```xml
[...]
<dependency>
<groupId>de.bright-side.filesystemfacade</groupId>
<artifactId>filesystemfacade</artifactId>
<version>2.6.0</version>
</dependency>
[...]
```


## Change History
Version 2.3.0 (2019-08-03)
134 pom.xml
@@ -2,17 +2,46 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>de.bright_side.filesystemfacade</groupId>
<groupId>de.bright-side.filesystemfacade</groupId>
<artifactId>filesystemfacade</artifactId>
<version>2.6.0</version>
<name>FileSystemFacade</name>
<description>A facade for different file systems</description>

<url>https://github.com/pheyse/FileSystemFacade</url>

<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
<comments>A business-friendly OSS license</comments>
</license>
</licenses>
<organization>
<name>Philip Heyse</name>
<url>http://www.bright-side.de</url>
</organization>
<developers>
<developer>
<name>Philip Heyse</name>
<organization>Philip Heyse</organization>
<organizationUrl>http://www.bright-side.de</organizationUrl>
</developer>
</developers>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<scm>
<url>https://github.com/pheyse/FileSystemFacade</url>
<connection>scm:git:git://github.com/pheyse/FileSystemFacade.git</connection>
<developerConnection>scm:git:ssh://git@github.com:pheyse/FileSystemFacade.git</developerConnection>
<tag>HEAD</tag>
</scm>


<dependencies>
<dependency>
@@ -33,14 +62,39 @@
<version>2.4.1</version>
</dependency>
<dependency>
<groupId>de.bright_side.beam</groupId>
<groupId>de.bright-side.beam</groupId>
<artifactId>beam</artifactId>
<version>1.0.1</version>
</dependency>
</dependencies>
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<name>Sonatype Nexus Snapshots</name>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<name>Nexus Release Repository</name>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>

<build>
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.1.0</version>
</plugin>
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>3.7.1</version>
</plugin>
<plugin>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.0.0</version>
</plugin>

<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
@@ -57,33 +111,65 @@
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
</plugin>

<!--INFO: Add local jars that are not in official Maven repository, but
in the local libs folder{ -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.2</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>de.bright_side.beam-beam</id>
<phase>clean</phase>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>install-file</goal>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
<configuration>
<file>${basedir}/libs/beam-1.0.1.jar</file>
<groupId>de.bright_side.beam</groupId>
<artifactId>beam</artifactId>
<version>1.0.1</version>
<packaging>jar</packaging>
</configuration>
</execution>
</executions>
</plugin>
<!--INFO: Add local jars } -->


<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.7</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>false</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
@@ -97,9 +183,13 @@
</execution>
</executions>
</plugin>


</plugins>
</build>

<reporting>
<plugins>
<plugin>
<artifactId>maven-project-info-reports-plugin</artifactId>
</plugin>
</plugins>
</reporting>
</project>
@@ -83,7 +83,7 @@ public String getTenantName() {
return tenantName;
}
/**
* @param tenant the table which contains the file system data is separated into different apps and those into tenants. Each app-tenant-combination has its own file system
* @param tenantName the table which contains the file system data is separated into different apps and those into tenants. Each app-tenant-combination has its own file system
*/
public void setTenantName(String tenantName) {
this.tenantName = tenantName;
@@ -134,6 +134,7 @@ public Connection getDbConnection() {

/**
* Either dbDriverClassName, dbUrl, dbUserName and dbPassword are needed or a dbConnection object
* @param dbConnection a db connection object
*/
public void setDbConnection(Connection dbConnection) {
this.dbConnection = dbConnection;
@@ -45,33 +45,47 @@
private FSFFile baseDir;
private FSFSystem innerFS;

/**
*
* @param innerFS inner file system on which the encrypted file system is based
* @param password password that is used to encrypt and decrypt the data
* @param basePath the path where the encrypted dir is located, e.g. "C:\\data\\myEncryptedDir"
* @throws Exception on general error
*/
public EncryptedFS(FSFSystem innerFS, String password, String basePath) throws Exception {
this (innerFS, password.getBytes(ENCODING), basePath, FSFFileUtil.createDefaultEnvironment());
}

/**
*
* @param innerFS inner file system on which the encrypted file system is based
* @param password password that is used to encrypt and decrypt the data
* @param basePath the path where the encrypted dir is located, e.g. "C:\\data\\myEncryptedDir"
* @param environment instance to e.g. provide the current time
* @throws Exception on general error
*/
public EncryptedFS(FSFSystem innerFS, String password, String basePath, FSFEnvironment environment) throws Exception {
this (innerFS, password.getBytes(ENCODING), basePath, environment);
}

/**
*
* @param innerFS
* @param password
* @param innerFS inner file system on which the encrypted file system is based
* @param password password that is used to encrypt and decrypt the data
* @param basePath the path where the encrypted dir is located, e.g. "C:\\data\\myEncryptedDir"
* @param environment
* @throws Exception
* @throws Exception on general error
*/
public EncryptedFS(FSFSystem innerFS, byte[] password, String basePath) throws Exception {
this(innerFS, password, basePath, FSFFileUtil.createDefaultEnvironment());
}

/**
*
* @param innerFS
* @param password
* @param innerFS inner file system on which the encrypted file system is based
* @param password password that is used to encrypt and decrypt the data
* @param basePath the path where the encrypted dir is located, e.g. "C:\\data\\myEncryptedDir"
* @param environment
* @throws Exception
* @param environment instance to e.g. provide the current time
* @throws Exception on general error
*/
public EncryptedFS(FSFSystem innerFS, byte[] password, String basePath, FSFEnvironment environment) throws Exception {
this.innerFS = innerFS;
@@ -260,7 +274,10 @@ public FSFSystem getInnerFS() {
* (which is usually the case for the last block) the remaining bytes are filled with random data. Hence each time an encrypted file name is generated, it is different
* (unless the length matches exactly 1 block).
* @param plainDataLength: null if unknown (e.g. because createByPath was called an no length was provided)
*
* @param innerParentFile the inner parent file
* @param plainFilename the filename in a not encrypted form
* @param plainDataLength the length of the data if it wasn't encrypted
* @return the existing inner file if found
*/
protected FSFFile toExistingInnerFileIfPossibleByParentAndName(FSFFile innerParentFile, String plainFilename, Long plainDataLength) {
if (innerParentFile.exists()) {
@@ -286,7 +303,8 @@ protected FSFFile toExistingInnerFileIfPossibleByParentAndName(FSFFile innerPare
* for each plain file name there are multiple encrypted file names. This is because the encryption is done block-wise and if a block isn't full
* (which is usually the case for the last block) the remaining bytes are filled with random data. Hence each time an encrypted file name is generated, it is different
* (unless the length matches exactly 1 block).
*
* @param innerFile the current inner file
* @return the new inner file
*/
protected FSFFile toExistingInnerFileIfPossible(FSFFile innerFile) {
if (innerFile == null) {
@@ -323,11 +341,12 @@ protected FSFFile toExistingInnerFileIfPossible(FSFFile innerFile) {
}

/**
*
* @param file
* The file size is stored in the filename so that it can be returned without any processing logic. However the filename needs to be adjusted whenever the length of the file changes.
* This method performs that operation.
* @param file the file object which should be renamed
* @param appendedLength if appended, the length before the appending. Otherwise 0
* @param writtenBytes number of written bytes
* @throws IOException
* @throws IOException on general errors
*/
protected void renameAccordingToLength(EncryptedFile file, long appendedLength, long writtenBytes) throws IOException {
String plainFilename = file.getName();

0 comments on commit 915b9a8

Please sign in to comment.
You can’t perform that action at this time.