public class Base64Coder extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
decode(byte[] encoded,
Charset charset) |
static String |
decode(String encoded)
Decodes the given base64 encoded string assuming the default charset.
|
static byte[] |
decodeBinary(String encoded)
Decodes the given base64 encoded string using the default charset.
|
static String |
encode(byte[] unencoded)
Encodes the given byte array to a base64 encoded String. returns
null
if the given byte array is null, empty string if the given byte array is
empty. |
static String |
encode(byte[] unencoded,
Charset charset)
Encodes the given byte array to a base64 encoded String. returns
null
if the given byte array is null, empty string if the given byte array is
empty. |
static String |
encode(String unencoded)
Encodes the given string to a base64 encoded string.
|
static String |
encode(String unencoded,
Charset charset) |
public static String encode(byte[] unencoded)
null
if the given byte array is null, empty string if the given byte array is
empty.unencoded - the array of unencoded bytes that shall get encodedCharset.defaultCharsetpublic static String encode(byte[] unencoded, Charset charset)
null
if the given byte array is null, empty string if the given byte array is
empty.unencoded - the array of unencoded bytes that shall get encodedCharset.defaultCharsetpublic static String encode(String unencoded)
null if the given string is null.public static String decode(String encoded)
null if the
given string is null.encoded - the base64 encoded stringpublic static byte[] decodeBinary(String encoded)
null if the given string is null.encoded - the base64 encoded stringCopyright © 2020 Red Hat, Inc. All Rights Reserved.