com.vgrs.xcode.cmdline.common
Class Base32CmdLine

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

public class Base32CmdLine
extends CmdLine

This class converts a string of binary bytes into an ASCII compatible sequence using only the characters [a-z, 2-7]. The input sequence is read 5 bits at-a-time, and each 5 bits is converted into one of the 32 allowed characters.

Version:
1.0 Aug 10, 2010
Author:
nchigurupati

Field Summary
 
Fields inherited from class com.vgrs.xcode.cmdline.CmdLine
SWITCH_FILE
 
Constructor Summary
Base32CmdLine(java.lang.String[] args)
           
 
Method Summary
 java.lang.String getUsageOptions()
          Return only the options for this command.
static void main(java.lang.String[] args)
           
static void testDecode(java.io.File input)
          Base32 decode the input in the file.
static void testDecode(java.lang.String input)
          Base32 decode the given input
static void testEncode(java.io.File input)
          Base32 encode the input in the file.
static void testEncode(java.lang.String input)
          Base32 encode the given input
 
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

Base32CmdLine

public Base32CmdLine(java.lang.String[] args)
Parameters:
args - the command line arguments.
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)

testEncode

public static void testEncode(java.io.File input)
Base32 encode the input in the file.

Parameters:
input - the file containing the input to be base32 encoded.

testDecode

public static void testDecode(java.io.File input)
Base32 decode the input in the file.

Parameters:
input - the file containing the input to be base32 decoded.

testEncode

public static void testEncode(java.lang.String input)
                       throws XcodeException
Base32 encode the given input

Parameters:
input - Code points prefixed with \U or 0x.
Throws:
XcodeException

testDecode

public static void testDecode(java.lang.String input)
                       throws XcodeException
Base32 decode the given input

Parameters:
input - a base32 encoded string to be decoded.
Throws:
XcodeException


Copyright © 2000-2010 VeriSign Inc. All Rights Reserved