it.sauronsoftware.base64
Class Base64

java.lang.Object
  extended byit.sauronsoftware.base64.Base64

public class Base64
extends java.lang.Object

Base64 encoding and decoding static methods for strings.

Since:
1.1
Author:
Carlo Pelliccia

Constructor Summary
Base64()
           
 
Method Summary
static java.lang.String decode(java.lang.String str)
          Decodes a string which is base64 encoded.
static java.lang.String encode(java.lang.String str)
          Encodes a string as base64.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Base64

public Base64()
Method Detail

encode

public static java.lang.String encode(java.lang.String str)
                               throws java.lang.RuntimeException
Encodes a string as base64.

Parameters:
str - Input string.
Returns:
Encoded string.
Throws:
java.lang.RuntimeException - Some error occurred during encoding.

decode

public static java.lang.String decode(java.lang.String str)
                               throws java.lang.RuntimeException
Decodes a string which is base64 encoded.

Parameters:
str - Encoded string.
Returns:
Decoded string.
Throws:
java.lang.RuntimeException - The given string is not well encoded...