public final class BASE64Utility
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static byte[] |
decode(byte[] in)
This method extracts the bytes of the String into a byte array using the UTF-8 character
encoding.
|
static byte[] |
decode(java.lang.String in)
This method extracts the bytes of the String into a byte array using the UTF-8 character
encoding.
|
static java.lang.String |
encode(byte[] in)
Reads the input array and returns the base 64 encoding of the bytes that are in the byte array.
|
static java.lang.String |
encode(byte[] in,
boolean crlf76)
Reads the input array and returns the base 64 encoding of the bytes that are in the byte array.
|
public static byte[] decode(byte[] in) throws java.io.IOException
in
- The string to decode in accordance with the Base 64 RFC2045.java.io.IOException
- If an error occurs while reading off the stream.public static byte[] decode(java.lang.String in) throws java.io.IOException
in
- The string to decode in accordance with the Base 64 RFC2045.java.io.IOException
- If an error occurs while reading off the stream.public static java.lang.String encode(byte[] in, boolean crlf76) throws java.io.IOException
in
- Array of bytes to be encoded.crlf76
- A value of true
indicates that a carriage-return and line-feed (0x000D 0x000A) pair
are written at 76 byte intervals as specified by the MIME Part one RFC2045. A value of
false
indicates that no carriage-return line-feed pair are in the base 64 encoding result.java.io.IOException
- If an error occurs while reading off the stream.public static java.lang.String encode(byte[] in) throws java.io.IOException
in
- Array of bytes to be encoded.java.io.IOException
- If an error occurs while reading off the stream.