Class SubstitutionFileUtil
- java.lang.Object
-
- com.sun.enterprise.admin.servermgmt.stringsubs.impl.SubstitutionFileUtil
-
public class SubstitutionFileUtil extends Object
Utility class for the substitutable files.
-
-
Field Summary
Fields Modifier and Type Field Description static int
MAX_COPY_BYTE_COUNT
The maximum copy byte count.
-
Constructor Summary
Constructors Constructor Description SubstitutionFileUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int
getInMemorySubstitutionFileSizeInBytes()
Gets the maximum file size for which in-memory substitution can be performed.static void
removeDir(File file)
Deletes the given file, if the file is a directory then method will recursively delete the content of it.static File
setupDir(String prefix)
Create a directory with the given prefix.
-
-
-
Field Detail
-
MAX_COPY_BYTE_COUNT
public static final int MAX_COPY_BYTE_COUNT
The maximum copy byte count.- See Also:
- Constant Field Values
-
-
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.
-
-