public class Base64Util extends Object
Modifier and Type | Field and Description |
---|---|
protected static byte[] |
decodingTable |
protected static byte |
padding |
Constructor and Description |
---|
Base64Util() |
Modifier and Type | Method and Description |
---|---|
static byte[] |
decode(String data)
Decodes the Base64-encoded String to the equivalent binary data array.
|
static Byte[] |
decodeAsBoxed(String data) |
static String |
encode(byte[] data,
int off,
int length)
Encodes the input data, producing a base 64 string.
|
static String |
encode(Byte[] data,
int off,
int length)
Same as
encode(byte[], int, int) but accepts an array of boxed
Byte values. |
protected static final byte padding
protected static final byte[] decodingTable
public static String encode(Byte[] data, int off, int length)
encode(byte[], int, int)
but accepts an array of boxed
Byte values.data
- The sequence of bytes to encode. Every element must be non-null.off
- The offset into the data array to start encoding fromlength
- The number of bytes to encode, starting from off
public static String encode(byte[] data, int off, int length)
data
- the data to encode. It is assumed that none of the elements are
null.off
- The offset into the data array to start encoding fromlength
- The number of bytes to encode, starting from off
public static byte[] decode(String data)
Copyright © 2013-2015 JBoss, a division of Red Hat. All Rights Reserved.