Class SubDirectoryCacheFiles

  • All Implemented Interfaces:
    CacheFiles

    public class SubDirectoryCacheFiles
    extends java.lang.Object
    implements CacheFiles
    A CacheFiles implementation that stores all files in sub-directories right next to the original files.
    • Constructor Summary

      Constructors 
      Constructor Description
      SubDirectoryCacheFiles​(@NotNull java.lang.String directory)
      Creates a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      @NotNull java.io.File getCacheFile​(@NotNull java.io.File file, @Nullable java.lang.String prefix)
      Returns the File for caching a given file.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SubDirectoryCacheFiles

        public SubDirectoryCacheFiles​(@NotNull
                                      @NotNull java.lang.String directory)
        Creates a new instance.
        Parameters:
        directory - the name of the sub-directories
    • Method Detail

      • getCacheFile

        @NotNull
        public @NotNull java.io.File getCacheFile​(@NotNull
                                                  @NotNull java.io.File file,
                                                  @Nullable
                                                  @Nullable java.lang.String prefix)
        Description copied from interface: CacheFiles
        Returns the File for caching a given file.
        Specified by:
        getCacheFile in interface CacheFiles
        Parameters:
        file - the file to cache
        prefix - an optional prefix string
        Returns:
        the file for caching