|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ourgrid.common.util.JavaFileUtil
public class JavaFileUtil
This is a java file utils class, it has method to manipulate java file names.
Constructor Summary | |
---|---|
JavaFileUtil()
|
Method Summary | |
---|---|
static void |
copyFile(java.io.File sourceFile,
java.io.File destFile)
Algorithm used to copy files. |
static void |
copyFile(java.lang.String sourceFile,
java.lang.String destFile)
Algorithm used to copy files. |
static boolean |
deleteDir(java.io.File dir)
Deletes a directory and all of its contents recursively. |
static boolean |
deleteDir(java.lang.String dir)
Deletes a directory and all of its contents recursively. |
static java.lang.String |
extractJavaSuffix(java.lang.String namePlusSufix,
java.lang.String suffix)
This method extract the extension of the Java Source file name |
static java.lang.String |
getDigestRepresentation(java.io.File fileToDigest)
That utilitary method get a File oject in applying a Message Digest Filter, the result is a digest string representation of the file contents |
static java.lang.String |
getFilePermissions(java.io.File file)
This method provides the string representation for file permission on Linux systems. |
static java.lang.String |
getFullClassName(java.io.File file,
java.lang.String root)
This method determine the complete name of a class |
static java.lang.String |
getTranslatedFilePath(java.lang.String filepath,
java.util.Map<java.lang.String,java.lang.String> gumAttributesMap)
Makes translations that depend on the operating system being used. |
static boolean |
isAbsolutePath(java.lang.String filepath)
Tells if a given filepath represents an absolute path or not. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JavaFileUtil()
Method Detail |
---|
public static java.lang.String extractJavaSuffix(java.lang.String namePlusSufix, java.lang.String suffix)
namePlusSufix
- The coplete name to the Java Source Filesuffix
- The substring that should be extracted
public static java.lang.String getFullClassName(java.io.File file, java.lang.String root)
file
- The file abstraction that denotes a java class fileroot
- The root directory where the class is located
public static java.lang.String getDigestRepresentation(java.io.File fileToDigest) throws UnableToDigestFileException
fileToDigest
- The File object abstraction that denotes a file to be
digested
UnableToDigestFileException
- If there is any problem on the digest
generation, like the file is not found, I/O errors or the digest
algorithm is not valid.public static java.lang.String getFilePermissions(java.io.File file) throws ExecutorException
file
- The file which permissions will be determined.
ExecutorException
public static boolean isAbsolutePath(java.lang.String filepath)
filepath
- The file path.
public static java.lang.String getTranslatedFilePath(java.lang.String filepath, java.util.Map<java.lang.String,java.lang.String> gumAttributesMap)
public static boolean deleteDir(java.io.File dir)
dir
- Directory to delete.
public static boolean deleteDir(java.lang.String dir)
dir
- Directory to delete.
public static void copyFile(java.io.File sourceFile, java.io.File destFile) throws java.io.IOException
sourceFile
- Sorce file.destFile
- Destination file.
java.io.IOException
- In case an exception occurs while copying.public static void copyFile(java.lang.String sourceFile, java.lang.String destFile) throws java.io.IOException
sourceFile
- Sorce file.destFile
- Destination file.
java.io.IOException
- In case an exception occurs while copying.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |