biweekly.util
Class Base64

java.lang.Object
  extended by biweekly.util.Base64

public class Base64
extends Object

Encodes and decodes data into base64.

Author:
GeorgeK
See Also:
http://stackoverflow.com/a/4265472/13379

Method Summary
static byte[] decode(String s)
          Translates the specified Base64 string into a byte array.
static String encode(byte[] buf)
          Translates the specified byte array into Base64 string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

encode

public static String encode(byte[] buf)
Translates the specified byte array into Base64 string.

Parameters:
buf - the byte array
Returns:
the translated Base64 string

decode

public static byte[] decode(String s)
Translates the specified Base64 string into a byte array.

Parameters:
s - the Base64 string
Returns:
the byte array


Copyright © 2013 Michael Angstadt. All Rights Reserved.