Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.anotherbigidea.util
Class Base64  view Base64 download Base64.java

java.lang.Object
  extended bycom.anotherbigidea.util.Base64

public class Base64
extends java.lang.Object

Base64 encoding/decoding utilities


Field Summary
protected static java.util.Hashtable charLookup
           
static char[] charset
           
static char paddingChar
           
 
Constructor Summary
Base64()
           
 
Method Summary
static void decode(java.io.Reader in, java.io.OutputStream out)
           
static byte[] decode(java.lang.String base64)
           
static java.lang.String encode(byte[] data)
           
static java.lang.String encode(byte[] data, int start, int length)
           
static void encode(java.io.InputStream in, java.io.Writer out)
           
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

charset

public static final char[] charset

paddingChar

public static final char paddingChar
See Also:
Constant Field Values

charLookup

protected static java.util.Hashtable charLookup
Constructor Detail

Base64

public Base64()
Method Detail

decode

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

decode

public static byte[] decode(java.lang.String base64)
                     throws java.lang.Exception

encode

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

encode

public static java.lang.String encode(byte[] data)

encode

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

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