public class Grep extends Object
Modifier and Type | Field and Description |
---|---|
private static int |
BYTE_OFFSET |
private static int |
COUNT |
private static int |
EXPAND_ZIP_FILES |
private static int |
FILES_WITH_MATCHES |
private static int |
FILES_WITHOUT_MATCH |
private static int |
LINE_NUMBER |
private static int |
LINE_REGEXP |
private static int |
NO_FILENAME |
private static String |
PROGNAME |
private static String |
PROGVERSION |
private static int |
QUIET |
private static int |
REVERT_MATCH |
private static int |
SILENT |
Modifier | Constructor and Description |
---|---|
private |
Grep() |
Modifier and Type | Method and Description |
---|---|
private static String |
fileNameString(String fileName,
String zipName) |
static int |
grep(String[] argv,
RESyntax syntax,
PrintStream out)
Runs Grep with the specified arguments.
|
static void |
main(String[] argv)
Invokes the grep() function below with the command line arguments
and using the RESyntax.RE_SYNTAX_GREP syntax, which attempts to
emulate the traditional UNIX grep syntax.
|
private static boolean |
processReader(RE pattern,
BufferedReader br,
boolean[] options,
String filename,
String zipName,
PrintStream out) |
private static boolean |
processStream(RE pattern,
InputStream is,
String encoding,
boolean[] options,
String filename,
String zipName,
PrintStream out) |
private static final int BYTE_OFFSET
private static final int COUNT
private static final int LINE_NUMBER
private static final int QUIET
private static final int SILENT
private static final int NO_FILENAME
private static final int REVERT_MATCH
private static final int FILES_WITH_MATCHES
private static final int LINE_REGEXP
private static final int FILES_WITHOUT_MATCH
private static final int EXPAND_ZIP_FILES
private static final String PROGNAME
private static final String PROGVERSION
private Grep()
public static void main(String[] argv)
public static int grep(String[] argv, RESyntax syntax, PrintStream out)
private static boolean processStream(RE pattern, InputStream is, String encoding, boolean[] options, String filename, String zipName, PrintStream out)
private static String fileNameString(String fileName, String zipName)
private static boolean processReader(RE pattern, BufferedReader br, boolean[] options, String filename, String zipName, PrintStream out)
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses