public final class Base64CoderCommons
extends java.lang.Object
Utility class for coding and decoding binary data on Base 64 format.
Project:Library for the integration with the services of @Firma, eVisor and TS@.
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
decodeBase64(byte[] data)
Method that decodes data encoded on Base64.
|
static byte[] |
decodeBase64(byte[] data,
int offset,
int len)
Method that decodes data encoded on Base64.
|
static java.lang.String |
decodeBase64(java.lang.String data)
Method that decodes a string encoded on Base64.
|
static byte[] |
encodeBase64(byte[] data)
Method that encodes data on Base64.
|
static byte[] |
encodeBase64(byte[] data,
int offset,
int len)
Method that encodes data on Base64.
|
static java.lang.String |
encodeBase64(java.lang.String data)
Method that encodes a string on Base64.
|
static boolean |
isBase64Encoded(byte[] data)
Method that checks if data is encoded on Base64.
|
public static byte[] encodeBase64(byte[] data)
throws TransformersException
data - Parameter that represents the data to encode.TransformersException - If the method fails.public static byte[] encodeBase64(byte[] data,
int offset,
int len)
throws TransformersException
data - Parameter that represents the data to encode.offset - Parameter that represents the initial position where to start the encoding.len - Parameter that represents the final position where to finish the encoding.TransformersException - If the method fails.public static byte[] decodeBase64(byte[] data)
throws TransformersException
data - Parameter that represents the data to decode.TransformersException - If the method fails.public static byte[] decodeBase64(byte[] data,
int offset,
int len)
throws TransformersException
data - Parameter that represents the data to decode.offset - Parameter that represents the initial position where to start the decoding.len - Parameter that represents the final position where to finish the encoding.TransformersException - If the method fails.public static boolean isBase64Encoded(byte[] data)
data - Parameter that represents the data to check.public static java.lang.String encodeBase64(java.lang.String data)
throws TransformersException
data - Parameter that represents the string to encode.TransformersException - If the method fails.public static java.lang.String decodeBase64(java.lang.String data)
throws TransformersException
data - Parameter that represents the string to decode.TransformersException - If the method fails.