Crossfire JXClient, Trunk
|
Static Public Member Functions | |
static void | main (String[] args) throws IOException |
Static Private Member Functions | |
static Stream< Path > | getPathStream (Path path) |
static Stream< String > | path2Lines (Path path) |
static void | printUsageAndExit (String... str) |
Grep prints lines matching a regex. See printUsageAndExit(String...) method for instructions and command line parameters. This sample shows examples of using next features:
|
staticprivate |
Flattens file system hierarchy into a stream. This code is not inlined for the reason of Files.walk() throwing a checked IOException that must be caught.
path | - the file or directory |
Definition at line 162 of file Grep.java.
References path.
Referenced by main().
|
static |
The main method for the Grep program. Run program with empty argument list to see possible arguments.
args | the argument list for Grep. |
java.io.IOException | If an I/O error occurs. |
Definition at line 89 of file Grep.java.
References getPathStream(), path2Lines(), and printUsageAndExit().
|
staticprivate |
Produces a stream of lines from a file. The result is a stream in order to close it later. This code is not inlined for the reason of Files.lines() throwing a checked IOException that must be caught.
path | - the file to read |
Definition at line 178 of file Grep.java.
References path.
Referenced by main().
|
staticprivate |