pt.tumba.parser.swf
Class Base64

java.lang.Object
  extended by pt.tumba.parser.swf.Base64

public class Base64
extends java.lang.Object

Base64 encoding/decoding utilities

Author:
unknown

Field Summary
private static Base64 _theInstance
           
protected static java.util.Hashtable charLookup
          Description of the Field
static char[] charset
          Description of the Field
static char paddingChar
          Description of the Field
 
Constructor Summary
private Base64()
           
 
Method Summary
static void decode(java.io.Reader in, java.io.OutputStream out)
          Description of the Method
static byte[] decode(java.lang.String base64)
          Description of the Method
static java.lang.String encode(byte[] data)
          Description of the Method
static java.lang.String encode(byte[] data, int start, int length)
          Description of the Method
static void encode(java.io.InputStream in, java.io.Writer out)
          Description of the Method
static Base64 getInstance()
           
static void main(java.lang.String[] args)
          If args.length > 0 then encode binary on stdin to base64 on stdout, else decode base64 on stdin to binary on stdout
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_theInstance

private static final Base64 _theInstance

charset

public static final char[] charset
Description of the Field


paddingChar

public static final char paddingChar
Description of the Field

See Also:
Constant Field Values

charLookup

protected static java.util.Hashtable charLookup
Description of the Field

Constructor Detail

Base64

private Base64()
Method Detail

getInstance

public static Base64 getInstance()

decode

public static void decode(java.io.Reader in,
                          java.io.OutputStream out)
                   throws java.lang.Exception
Description of the Method

Parameters:
in - Description of the Parameter
out - Description of the Parameter
Throws:
java.lang.Exception - Description of the Exception

decode

public static byte[] decode(java.lang.String base64)
                     throws java.lang.Exception
Description of the Method

Parameters:
base64 - Description of the Parameter
Returns:
Description of the Return Value
Throws:
java.lang.Exception - Description of the Exception

encode

public static void encode(java.io.InputStream in,
                          java.io.Writer out)
                   throws java.io.IOException
Description of the Method

Parameters:
in - Description of the Parameter
out - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

encode

public static java.lang.String encode(byte[] data)
Description of the Method

Parameters:
data - Description of the Parameter
Returns:
Description of the Return Value

encode

public static java.lang.String encode(byte[] data,
                                      int start,
                                      int length)
                               throws java.lang.ArrayIndexOutOfBoundsException
Description of the Method

Parameters:
data - Description of the Parameter
start - Description of the Parameter
length - Description of the Parameter
Returns:
Description of the Return Value
Throws:
java.lang.ArrayIndexOutOfBoundsException - Description of the Exception

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
If args.length > 0 then encode binary on stdin to base64 on stdout, else decode base64 on stdin to binary on stdout

Parameters:
args - The command line arguments
Throws:
java.lang.Exception - Description of the Exception