|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.shibboleth.utilities.java.support.codec.Base64Support
public final class Base64Support
Helper class for working with Base64.
This helper class specifically addresses that waste of the Apache Codec encode/decode static methods creating new
instances of the Base64 for every operation. It also provides the helper method to produce both chunked and
unchunked encoded content as strings.
| Field Summary | |
|---|---|
static boolean |
CHUNKED
Chunk the encoded data into 76-character lines broken by CRLF characters. |
private static org.apache.commons.codec.binary.Base64 |
CHUNKED_ENCODER
Encoder used to produce chunked output. |
static boolean |
UNCHUNKED
Do not chunk encoded data. |
private static org.apache.commons.codec.binary.Base64 |
UNCHUNKED_ENCODER
Encoder used to produce unchunked output. |
| Constructor Summary | |
|---|---|
private |
Base64Support()
Constructor. |
| Method Summary | |
|---|---|
static byte[] |
decode(String data)
Decodes (un)chunked Base64 encoded data. |
static String |
encode(byte[] data,
boolean chunked)
Base64 encodes the given binary data. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final boolean CHUNKED
public static final boolean UNCHUNKED
private static final org.apache.commons.codec.binary.Base64 CHUNKED_ENCODER
private static final org.apache.commons.codec.binary.Base64 UNCHUNKED_ENCODER
| Constructor Detail |
|---|
private Base64Support()
| Method Detail |
|---|
@Nonnull
public static String encode(@Nonnull
byte[] data,
boolean chunked)
data - data to encodechunked - whether the encoded data should be chunked or not
@Nonnull
public static byte[] decode(@Nonnull
String data)
data - Base64 encoded data
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||