|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.izforge.izpack.util.FileUtil
public class FileUtil
Provides general global file utility methods
Constructor Summary | |
---|---|
FileUtil()
Creates a new FileUtil object. |
Method Summary | |
---|---|
static boolean |
fileContains(java.lang.String aFileName,
java.lang.String aSearchString)
Searches case sensitively, and returns true if the given SearchString occurs in the first File with the given Filename. |
static boolean |
fileContains(java.lang.String aFileName,
java.lang.String aSearchString,
boolean caseInSensitiveSearch)
Tests if the given File contains the given Search String |
static java.util.ArrayList |
getFileContent(java.lang.String fileName)
Gets the content from a File as StringArray List. |
static long |
getFileDateTime(java.net.URL url)
Gets file date and time. |
static java.lang.String[] |
getFileNames(java.lang.String dirPath)
|
static java.lang.String[] |
getFileNames(java.lang.String dirPath,
java.io.FilenameFilter fileNameFilter)
|
static void |
main(java.lang.String[] args)
Test main |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileUtil()
Method Detail |
---|
public static java.util.ArrayList getFileContent(java.lang.String fileName) throws java.io.IOException
fileName
- A file to read from.
java.io.IOException
public static boolean fileContains(java.lang.String aFileName, java.lang.String aSearchString)
aFileName
- A files nameaSearchString
- the string search for
public static boolean fileContains(java.lang.String aFileName, java.lang.String aSearchString, boolean caseInSensitiveSearch)
aFileName
- A files nameaSearchString
- the String to search forcaseInSensitiveSearch
- If false the Search is casesensitive
public static long getFileDateTime(java.net.URL url)
url
- The URL of the file for which date and time will be returned.
public static java.lang.String[] getFileNames(java.lang.String dirPath) throws java.lang.Exception
java.lang.Exception
public static java.lang.String[] getFileNames(java.lang.String dirPath, java.io.FilenameFilter fileNameFilter) throws java.lang.Exception
java.lang.Exception
public static void main(java.lang.String[] args)
args
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |