public class Base64Utils extends Object
| Constructor and Description |
|---|
Base64Utils() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
decode(char[] data,
int off,
int len)
Deprecated.
|
static void |
decode(char[] data,
int off,
int len,
OutputStream ostream)
Deprecated.
|
static byte[] |
decode(String data)
Decodes a base64 encoded string into a byte array.
|
static void |
decode(String data,
OutputStream ostream)
Deprecated.
|
static String |
encode(byte[] data)
Deprecated.
|
static String |
encode(byte[] data,
int off,
int len)
Deprecated.
|
static void |
encode(byte[] data,
int off,
int len,
OutputStream ostream)
Deprecated.
|
static void |
encode(byte[] data,
int off,
int len,
StringBuffer buffer)
Deprecated.
|
static void |
encode(byte[] data,
int off,
int len,
Writer writer)
Deprecated.
|
static String |
encode(javax.activation.DataHandler dh)
Get a base64 representation of the content of a given
DataHandler as a string. |
static char[] |
encodeToCharArray(javax.activation.DataHandler dh)
Get a base64 representation of the content of a given
DataHandler as a char array. |
static boolean |
isValidBase64Encoding(String data)
Deprecated.
|
public static String encode(javax.activation.DataHandler dh) throws IOException
DataHandler as a string.
This method will try to carry out the encoding operation in the most efficient way.dh - the data handler with the content to encodeIOException - if an I/O error occurs when reading the content of the data handlerpublic static char[] encodeToCharArray(javax.activation.DataHandler dh)
throws IOException
DataHandler as a char array.
This method will try to carry out the encoding operation in the most efficient way.dh - the data handler with the content to encodeIOException - if an I/O error occurs when reading the content of the data handlerpublic static byte[] decode(char[] data,
int off,
int len)
public static byte[] decode(String data)
base64Binary.data - the base64 encoded datapublic static boolean isValidBase64Encoding(String data)
public static void decode(char[] data,
int off,
int len,
OutputStream ostream)
throws IOException
IOExceptionpublic static void decode(String data, OutputStream ostream) throws IOException
IOExceptionpublic static String encode(byte[] data)
public static String encode(byte[] data, int off, int len)
public static void encode(byte[] data,
int off,
int len,
StringBuffer buffer)
public static void encode(byte[] data,
int off,
int len,
OutputStream ostream)
throws IOException
IOExceptionpublic static void encode(byte[] data,
int off,
int len,
Writer writer)
throws IOException
IOExceptionCopyright © The Apache Software Foundation. All Rights Reserved.