public class Base64
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static byte[] |
BASE64INDEXES |
private static byte[] |
CHAR_SET |
Constructor and Description |
---|
Base64() |
Modifier and Type | Method and Description |
---|---|
static byte[] |
decode(byte[] buffer)
Decodes Base64 data into octects.
|
static java.lang.String |
decodeAsString(byte[] buffer)
Decodes array of bytes using base64 decoding and returns the result as a string.
|
static java.lang.String |
decodeAsString(java.lang.String text)
Decodes a string using base64 and returns the result as another string.
|
static byte[] |
encode(byte[] buffer)
Encodes array of bytes using base64 encoding.
|
static java.lang.String |
encodeAsString(byte[] buffer)
Encodes array of bytes using base64 encoding and returns the result as a string.
|
static java.lang.String |
encodeAsString(java.lang.String text)
Encodes a string using base64 and returns the result as another string.
|
private static final byte[] CHAR_SET
private static final byte[] BASE64INDEXES
public static byte[] encode(byte[] buffer)
buffer
- Array of bytes to be encoded.public static byte[] decode(byte[] buffer)
buffer
- Byte array containing Base64 datapublic static java.lang.String encodeAsString(byte[] buffer)
buffer
- Array of bytes to be encoded.public static java.lang.String encodeAsString(java.lang.String text)
text
- String to be encoded.public static java.lang.String decodeAsString(byte[] buffer)
buffer
- Array of bytes to be decoded.public static java.lang.String decodeAsString(java.lang.String text)
text
- String to be decoded.