public class Base64 extends Object
Modifier and Type | Method and Description |
---|---|
static byte[] |
decode(char[] in)
Decodes a byte array from Base64 format.
|
static byte[] |
decode(String s)
Decodes a byte array from Base64 format.
|
static String |
decodeString(String s)
Decodes a string from Base64 format using the platform's default charset encoding.
|
static String |
decodeString(String s,
String charset)
Decodes a string from Base64 format using the given charset encoding.
|
static char[] |
encode(byte[] in)
Encodes a byte array into Base64 format.
|
static String |
encodeString(String s)
Encodes a string into Base64 format using the platform's default charset.
|
public static byte[] decode(char[] in)
IllegalArgumentException
- if the input is not valid Base64 encoded data.public static byte[] decode(String s)
IllegalArgumentException
- if the input is not valid Base64 encoded data.public static String decodeString(String s)
IllegalArgumentException
- if the input is not valid Base64 encoded data.public static String decodeString(String s, String charset) throws UnsupportedEncodingException
UnsupportedEncodingException
- if the charset encoding is not supportedIllegalArgumentException
- if the input is not valid Base64 encoded data.public static char[] encode(byte[] in)
Copyright © 2008-2012 Anders Møller & Mathias Schwarz.