redstone.xmlrpc.util
Class Base64
java.lang.Object
redstone.xmlrpc.util.Base64
public class Base64
- extends java.lang.Object
Provides encoding of raw bytes to base64-encoded characters, and
decoding of base64 characters to raw bytes. The original version
was written by Kevin Kelly which has been updated to support
newline characters based on from Object Refinery Limited and
contributors.
- Author:
- Kevin Kelley (kelley@iguana.ruralnet.net), Object Refinery Limited and Contributors
Method Summary |
static byte[] |
decode(byte[] data)
Returns an array of bytes which were encoded in the passed
character array. |
static char[] |
encode(byte[] data)
Returns an array of base64-encoded characters to represent the
passed data array. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Base64
public Base64()
encode
public static char[] encode(byte[] data)
- Returns an array of base64-encoded characters to represent the
passed data array.
- Parameters:
data
- the array of bytes to encode
- Returns:
- base64-coded character array.
decode
public static byte[] decode(byte[] data)
- Returns an array of bytes which were encoded in the passed
character array.
- Parameters:
data
- the array of base64-encoded characters which can
contain whitespace, padding, and invalid characters
which are stripped from the input.
- Returns:
- decoded data array