List of utility methods to do File Content Search
boolean | fileContains(String aFileName, String aSearchString) Searches case sensitively, and returns true if the given SearchString occurs in the first File with the given Filename. return (fileContains(aFileName, aSearchString, false));
|
boolean | fileContains(String aFileName, String aSearchString, boolean caseInSensitiveSearch) Tests if the given File contains the given Search String boolean result = false; String searchString = caseInSensitiveSearch ? aSearchString .toLowerCase() : aSearchString; List<String> fileContent = new ArrayList<String>(); try { fileContent = getFileContent(aFileName); } catch (IOException e) { e.printStackTrace(); ... |