org.apache.xmlrpc
Class Base64

java.lang.Object
  |
  +--org.apache.xmlrpc.Base64

public final class Base64
extends java.lang.Object

This class provides encode/decode for RFC 2045 Base64 as defined by RFC 2045, N. Freed and N. Borenstein. RFC 2045: Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies. Reference 1996

Version:
$Id: Base64.java,v 1.2 2002/02/19 02:25:01 jon Exp $
Author:
Jeffrey Rodriguez

Field Summary
private static byte[] base64Alphabet
           
private static int BASELENGTH
           
private static int EIGHTBIT
           
private static int FOURBYTE
           
private static byte[] lookUpBase64Alphabet
           
private static int LOOKUPLENGTH
           
private static byte PAD
           
private static int SIGN
           
private static int SIXBIT
           
private static int SIXTEENBIT
           
private static int TWENTYFOURBITGROUP
           
 
Constructor Summary
Base64()
           
 
Method Summary
(package private) static void ()
           
static byte[] decode(byte[] base64Data)
          Decodes Base64 data into octects
static byte[] encode(byte[] binaryData)
          Encodes hex octects into Base64.
static boolean isArrayByteBase64(byte[] arrayOctect)
           
static boolean isBase64(byte octect)
           
static boolean isBase64(java.lang.String isValidString)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

BASELENGTH

private static final int BASELENGTH

LOOKUPLENGTH

private static final int LOOKUPLENGTH

TWENTYFOURBITGROUP

private static final int TWENTYFOURBITGROUP

EIGHTBIT

private static final int EIGHTBIT

SIXTEENBIT

private static final int SIXTEENBIT

SIXBIT

private static final int SIXBIT

FOURBYTE

private static final int FOURBYTE

SIGN

private static final int SIGN

PAD

private static final byte PAD

base64Alphabet

private static byte[] base64Alphabet

lookUpBase64Alphabet

private static byte[] lookUpBase64Alphabet
Constructor Detail

Base64

public Base64()
Method Detail

static void ()

isBase64

public static boolean isBase64(java.lang.String isValidString)

isBase64

public static boolean isBase64(byte octect)

isArrayByteBase64

public static boolean isArrayByteBase64(byte[] arrayOctect)

encode

public static byte[] encode(byte[] binaryData)
Encodes hex octects into Base64.
Parameters:
binaryData - Array containing binary data to encode.
Returns:
Base64-encoded data.

decode

public static byte[] decode(byte[] base64Data)
Decodes Base64 data into octects
Parameters:
binaryData - Byte array containing Base64 data
Returns:
Array containing decoded data.


Copyright © 1999-2002 Apache Software Foundation. All Rights Reserved.