com.csss.opensource.jhexdump
Class JHexDumpCmdLine
java.lang.Object
com.csss.opensource.jhexdump.JHexDump
com.csss.opensource.jhexdump.JHexDumpCmdLine
- public class JHexDumpCmdLine
- extends JHexDump
This class is responsible for providing the command line implementation
of JHexDump.
When executed while using one of the provided scripts, the command
line syntax is:
JHexDump.sh/.bat [-noascii] [-noposid] [-help]
- Version:
- 1.1
- Author:
- Lee Walton - The jZone
Constructor Summary |
protected |
JHexDumpCmdLine()
Protected constructor to inhibit the instantiation of this class. |
Method Summary |
protected void |
displayHelp()
Displays the command line help |
protected void |
execute(java.lang.String[] args)
Dumps the specified file to stdout. |
protected java.lang.String |
getFilename()
Gets the filename to process. |
static void |
main(java.lang.String[] args)
The entry point into the application. |
protected boolean |
parseCommandLine(java.lang.String[] args)
Parses the command line arguments. |
protected void |
setFilename(java.lang.String filename)
Sets the filename to process. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JHexDumpCmdLine
protected JHexDumpCmdLine()
- Protected constructor to inhibit the instantiation of this class.
main
public static void main(java.lang.String[] args)
- The entry point into the application.
Instantiates a new JHexDumpCmdLine instance, and calls the execute() method.
- Parameters:
args
- Array of command line arguments
getFilename
protected java.lang.String getFilename()
- Gets the filename to process.
- Returns:
- String
setFilename
protected void setFilename(java.lang.String filename)
- Sets the filename to process.
- Parameters:
filename
-
execute
protected void execute(java.lang.String[] args)
- Dumps the specified file to stdout.
Parses the command line arguments, opens the file specified,
and writes the output to System.out using JHexDumpReader.
- Parameters:
args
- Array of command line arguments
displayHelp
protected void displayHelp()
- Displays the command line help
parseCommandLine
protected boolean parseCommandLine(java.lang.String[] args)
- Parses the command line arguments.
The accepted arguments are:
-help : Display help message
-noascii : Supress the display of the ASCII representation
-noposind : Supress the display of the file position indicator
- Parameters:
args
- array of command line arguments
Copyright © 2003-2004 C/S Software Solutions Ltd. All Rights Reserved.