com.oakgrovesystems.util
Class Base64Encoder

java.lang.Object
  |
  +--com.oakgrovesystems.util.Base64Encoder

public class Base64Encoder
extends java.lang.Object

Encodes/decodes byte arrays to/from Base64-encoded Strings.


Constructor Summary
Base64Encoder()
           
 
Method Summary
static byte[] decode(java.lang.String inStr)
          Decodes a Base64 string to a byte array.
static java.lang.String encode(byte[] in)
          Encodes a byte array to a Base64 String.
static java.lang.String encode(byte[] in, boolean standard)
          Encodes a byte array to a Base64 String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Base64Encoder

public Base64Encoder()
Method Detail

encode

public static java.lang.String encode(byte[] in)
Encodes a byte array to a Base64 String.


encode

public static java.lang.String encode(byte[] in,
                                      boolean standard)
Encodes a byte array to a Base64 String.

Parameters:
standard - true if you want a standards compliant encoding; false if you want an encoding that can be used in URLs

decode

public static byte[] decode(java.lang.String inStr)
                     throws Base64Exception
Decodes a Base64 string to a byte array.

Base64Exception


Copyright (c) 1999-2004 Oak Grove Systems. All Rights Reserved.