| java.lang.Object com.sun.jbi.management.util.FileHelper
FileHelper | public class FileHelper (Code) | | author: Sun Microsystems, Inc |
Field Summary | |
static char[] | b32Chars Mapping of 5-bit integers to characters. |
b32Chars | static char[] b32Chars(Code) | | Mapping of 5-bit integers to characters.
Ambiguous characters like (0, 1, O) are skipped.
|
areFilesIdentical | public static boolean areFilesIdentical(File f1, File f2) throws java.io.IOException(Code) | | Compare two files for equality. The two files are equal if the binary contents of
of each of the files are identical.
|
cleanDirectory | public static boolean cleanDirectory(File dir)(Code) | | Removes all files and child directories in the specified directory.
false if unable to delete the file |
copy | public static boolean copy(String from, String to) throws java.io.IOException(Code) | | This method is used to perform directory copy
Parameters: from - path to the source dir Parameters: to - path to the destination dir false if the dir could not be copied throws: IOException - if there are problems in copying the fir |
createFile | public static boolean createFile(File file)(Code) | | Create a File. If the parent dirs don't exist create those first.
Parameters: file - - File to Create. true if the File was created, false otherwise. |
createFolder | public static boolean createFolder(File folder)(Code) | | Create a Foldr. If the parent dirs don't exist create those first.
Parameters: folder - - folder to Create. true if the File was created, false otherwise. |
fileCopy | public static boolean fileCopy(String source, String destination) throws java.io.IOException(Code) | | Make a copy of the source file in the destination file.
Parameters: source - the source file Parameters: destination - the destination file true if the operation was a success, false otherwise |
fileCopy | public static boolean fileCopy(String source, String destination, boolean overwrite) throws java.io.IOException(Code) | | Make a copy of the source file in the destination file.
Parameters: source - the source file Parameters: destination - the destination file Parameters: overwrite - true if the destination file can be overwritten if it exists true if the operation was a success, false otherwise |
finalizeDiscardedObjects | public static void finalizeDiscardedObjects()(Code) | | Reclaim memory, run object finalizers
|
getTimestamp | public static String getTimestamp()(Code) | | This method is used to create a timestamp that could be used to create
file names
String representation of the current time in yyyyMMddHHmm pattern |
readFile | public static String readFile(File aFile) throws Exception(Code) | | Read the file into a String and return the String value.
the contents of the file as a String |
|
|