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

Quick Search    Search Deep

com.imagero.uio.io
Class Base64  view Base64 download Base64.java

java.lang.Object
  extended bycom.imagero.uio.io.Base64

public class Base64
extends java.lang.Object

This class shows how simple and straightforward can be implementation of base 64 codec using BitInputStream and BitOutputStream


Field Summary
private static char[] crlf
           
(package private) static int[] decodeTable
           
private static char[] encodeTable
           
(package private) static int lineLength
           
 
Constructor Summary
Base64()
           
 
Method Summary
static void base64Decode(java.io.Reader in, java.io.OutputStream out)
          decode base64 encoded character stream and write it to given OutputStream
static byte[] base64Decode(java.lang.String s)
          decode base 64 encoded string
static java.lang.String base64Encode(byte[] b)
          base 64 encode
static void base64Encode(java.io.InputStream in, java.io.Writer out)
          base64 encode data from InputStream and write ict to given character stream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

encodeTable

private static final char[] encodeTable

decodeTable

static int[] decodeTable

lineLength

static int lineLength

crlf

private static final char[] crlf
Constructor Detail

Base64

public Base64()
Method Detail

base64Encode

public static java.lang.String base64Encode(byte[] b)
                                     throws java.io.IOException
base 64 encode


base64Encode

public static void base64Encode(java.io.InputStream in,
                                java.io.Writer out)
                         throws java.io.IOException
base64 encode data from InputStream and write ict to given character stream


base64Decode

public static byte[] base64Decode(java.lang.String s)
                           throws java.io.IOException
decode base 64 encoded string


base64Decode

public static void base64Decode(java.io.Reader in,
                                java.io.OutputStream out)
                         throws java.io.IOException
decode base64 encoded character stream and write it to given OutputStream