|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jcoderz.commons.util.Base64Util
public final class Base64Util
This class provides encode/decode for RFC 2045 Base64 as defined by RFC 2045, N. Freed and N. Borenstein. RFC 2045: Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies. Reference 1996 Available at: http://www.ietf.org/rfc/rfc2045.txt This class is used by XML Schema binary format validation This implementation does not encode/decode streaming data. You need the data that you will encode/decode already on a byte array.
| Method Summary | |
|---|---|
static void |
appendEncoded(StringBuffer sb,
byte[] binaryData)
Encodes hex octets into Base64. |
static byte[] |
decode(String encoded)
Decodes Base64 data into octets. |
static String |
encode(byte[] binaryData)
Encodes hex octets into Base64. |
static char[] |
encodeToChars(byte[] binaryData)
Encodes hex octets into Base64. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static char[] encodeToChars(byte[] binaryData)
binaryData - Array containing binary data.
public static String encode(byte[] binaryData)
binaryData - Array containing binary data.
public static void appendEncoded(StringBuffer sb,
byte[] binaryData)
sb - the string buffer that is used to write the
Base64 characters to.binaryData - Array containing binary data.
public static byte[] decode(String encoded)
throws ArgumentMalformedException
encoded - Base64 encoded string.
ArgumentMalformedException - if the given string is not
Base64 encoded.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||