com.devexperts.util
Class Base64

java.lang.Object
  extended by com.devexperts.util.Base64

public final class Base64
extends Object

Utility class for Base64 encoding and decoding. Supports configuration with arbitrary alphabet. Instances for common alphabets (as specified by RFC 2045 and RFC 4648) are provided via static fields DEFAULT and URLSAFE.


Field Summary
static Base64 DEFAULT
           
static Base64 DEFAULT_UNPADDED
           
static Base64 URLSAFE
           
static Base64 URLSAFE_UNPADDED
           
 
Constructor Summary
Base64(String alphabet)
           
 
Method Summary
 byte[] decode(String source)
           
 String encode(byte[] source)
           
 String getAlphabet()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT

public static final Base64 DEFAULT

URLSAFE

public static final Base64 URLSAFE

DEFAULT_UNPADDED

public static final Base64 DEFAULT_UNPADDED

URLSAFE_UNPADDED

public static final Base64 URLSAFE_UNPADDED
Constructor Detail

Base64

public Base64(String alphabet)
Method Detail

getAlphabet

public String getAlphabet()

encode

public String encode(byte[] source)

decode

public byte[] decode(String source)

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013 Devexperts. All Rights Reserved.