public final class FileContentSearch
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static boolean |
contains(java.io.File file,
java.lang.String pattern)
Determines if the given file contains the given regular expression.
|
static boolean |
contains(java.io.File file,
java.lang.String[] patterns)
Determines if the given file contains the given regular expressions.
|
public static boolean contains(java.io.File file,
java.lang.String pattern)
throws java.io.IOException
file - the file to testpattern - the pattern used to test the filetrue if the regular expression matches the file
content; otherwise falsejava.io.IOException - thrown if there is an error reading the filepublic static boolean contains(java.io.File file,
java.lang.String[] patterns)
throws java.io.IOException
file - the file to testpatterns - the array of patterns used to test the filetrue if one of the regular expressions matches the
file content; otherwise falsejava.io.IOException - thrown if there is an error reading the fileCopyright© 2012-21 Jeremy Long. All Rights Reserved.