Class SubstitutionFileUtil


  • public class SubstitutionFileUtil
    extends Object
    Utility class for the substitutable files.
    • Field Detail

      • MAX_COPY_BYTE_COUNT

        public static final int MAX_COPY_BYTE_COUNT
        The maximum copy byte count.
        See Also:
        Constant Field Values
    • Constructor Detail

      • SubstitutionFileUtil

        public SubstitutionFileUtil()
    • Method Detail

      • getInMemorySubstitutionFileSizeInBytes

        public static int getInMemorySubstitutionFileSizeInBytes()
        Gets the maximum file size for which in-memory substitution can be performed.
        Returns:
        Max file size in bytes to perform in-memory substitution.
      • setupDir

        public static File setupDir​(String prefix)
                             throws IOException
        Create a directory with the given prefix.
        Parameters:
        prefix - Prefix for the directory name.
        Returns:
        An extraction directory.
        Throws:
        IOException
      • removeDir

        public static void removeDir​(File file)
        Deletes the given file, if the file is a directory then method will recursively delete the content of it.
        Parameters:
        file - File to delete.