com.vgrs.xcode.cmdline.common
Class HexCmdLine

java.lang.Object
  extended by com.vgrs.xcode.cmdline.CmdLine
      extended by com.vgrs.xcode.cmdline.common.HexCmdLine

public class HexCmdLine
extends CmdLine

Encode an input file using Hexidecimal codes, or interpret those codes and decode to ASCII.

Version:
1.0 Jul 1, 2010
Author:
jcolosi

Field Summary
 
Fields inherited from class com.vgrs.xcode.cmdline.CmdLine
SWITCH_FILE
 
Constructor Summary
HexCmdLine(java.lang.String[] args)
          Construct a class to perform command line actions.
 
Method Summary
static void decode(java.io.File input)
          Interpret the input File as hexadecimal values and decode to ASCII.
static void decode(java.lang.String input)
          Interpret the input String as hexadecimal values and decode to ASCII.
static void encode(java.io.File input)
          Encode the data in the input File using hexadecimal values.
static void encode(java.lang.String input)
          Encode the input String using hexadecimal values.
 java.lang.String getUsageOptions()
          Return only the options for this command.
static void main(java.lang.String[] args)
          Entry point, integrates with the OS.
 
Methods inherited from class com.vgrs.xcode.cmdline.CmdLine
getCommandName, getOptions, setCommandName, setOptions, showUsage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HexCmdLine

public HexCmdLine(java.lang.String[] args)
Construct a class to perform command line actions. Input args must match the specified switches.

Parameters:
args -
Method Detail

getUsageOptions

public java.lang.String getUsageOptions()
Return only the options for this command. The usage and class name are populated by the super class.

Specified by:
getUsageOptions in class CmdLine
Returns:
the usage of this command line class.

main

public static void main(java.lang.String[] args)
Entry point, integrates with the OS. Processes input arguments and executes command line logic.

Parameters:
args - the command line arguments

encode

public static void encode(java.io.File input)
Encode the data in the input File using hexadecimal values.

Parameters:
input - the file containing the integer values to be encoded as hexadecimal string.

decode

public static void decode(java.io.File input)
Interpret the input File as hexadecimal values and decode to ASCII.

Parameters:
input - the file containing the hexadecimal values to be decoded to ASCII.

encode

public static void encode(java.lang.String input)
Encode the input String using hexadecimal values.

Parameters:
input - the string to be encoded using hexadecimal values.

decode

public static void decode(java.lang.String input)
Interpret the input String as hexadecimal values and decode to ASCII.

Parameters:
input - the string to be decoded to ASCII by interpreting the hexadecimal values.


Copyright © 2000-2010 VeriSign Inc. All Rights Reserved