public final class Base64Encoder extends Object
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
decode(byte[] eData)
Decodes a base64 byte array into a byte array.
|
static String |
decode(String s)
Decodes a base 64 String into a String.
|
static byte[] |
encode(byte[] dData,
boolean includePadding)
Encodes a byte array into a base 64 byte array.
|
static String |
encode(String s,
boolean includePadding)
Encodes a String into a base 64 String.
|
public static String encode(String s, boolean includePadding)
s - String to encode.public static String decode(String s) throws IllegalArgumentException
s - String to decode.IllegalArgumentException - _ If the given byte array was not valid base64 encoding.public static byte[] encode(byte[] dData,
boolean includePadding)
dData - byte array to encode.public static byte[] decode(byte[] eData)
eData - byte array to decode.IllegalArgumentException - thrown if the given byte array was not valid com.sun.syndication.io.impl.Base64 encoding.