public enum Base64 extends java.lang.Enum<Base64>
This class implements section 6.8. Base64 Content-Transfer-Encoding from RFC 2045 Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies by Freed and Borenstein.
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
decodeBase64(byte[] base64Data)
Decodes Base64 data into octects
|
static byte[] |
encodeBase64(byte[] binaryData)
Encodes binary data using the base64 algorithm but
does not chunk the output.
|
static byte[] |
encodeBase64(byte[] binaryData,
boolean isChunked)
Encodes binary data using the base64 algorithm, optionally
chunking the output into 76 character blocks.
|
static Base64 |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static Base64[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static Base64[] values()
for (Base64 c : Base64.values()) System.out.println(c);
public static Base64 valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic static byte[] encodeBase64(byte[] binaryData)
binaryData - binary data to encodepublic static byte[] encodeBase64(byte[] binaryData,
boolean isChunked)
binaryData - Array containing binary data to encode.isChunked - if true this encoder will chunk
the base64 output into 76 character blockspublic static byte[] decodeBase64(byte[] base64Data)
base64Data - Byte array containing Base64 dataCopyright © 2014-2015 Tomitribe Corporation. All Rights Reserved.