|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opennms.core.utils.Base64
Performs base 64 encoding and decoding on byte arrays.
Field Summary | |
private static char[] |
BASE64_CHARS
The base64 encoding map. |
private static char |
BASE64_PAD
The base64 padding character |
private static byte[] |
BASE64_VALUES
|
Constructor Summary | |
private |
Base64()
Empty, private constructor so this object will not be instantiated. |
Method Summary | |
static byte[] |
decodeBase64(char[] data)
Decodes a character array into the corresponding byte array. |
static char[] |
encodeBase64(byte[] data)
Encodes the passed byte array using the base64 rules. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final char[] BASE64_CHARS
The base64 encoding map. Using 6-bit values it is possible to map 24-bits into 4 characters. If there are not sufficent amount of bits to makeup six then it is padded with BASE64_PAD.
private static final byte[] BASE64_VALUES
private static final char BASE64_PAD
Constructor Detail |
private Base64()
Method Detail |
public static char[] encodeBase64(byte[] data)
Encodes the passed byte array using the base64 rules. The base64 encoding schema is performed by grouping the bytes in to 6-bit quantities and then encoding them.
For more information see RFC1341 for the format used for base64 encoding.
data
- The input byte array
public static byte[] decodeBase64(char[] data)
Decodes a character array into the corresponding byte array. The buffer must be an intergral number of 4 character. I.E. size mod 4 is equal to zero or an exception will be thrown. Likewise, if there is an invalid character in the input array then an exception will be thrown.
data
- The data stream to be filtered.
java.lang.IllegalArgumentException
- Thrown if an invalid buffer that cannot be decoded is
passed.
|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |