public class FileUtil
extends java.lang.Object
Constructor and Description |
---|
FileUtil()
Creates a new FileUtil object.
|
Modifier and Type | Method and Description |
---|---|
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 void |
main(java.lang.String[] args)
Test main
|
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 forpublic 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 casesensitivepublic static void main(java.lang.String[] args)
args
-