This class is used to encode and decode data in Base64 format as described in RFC 1521.
Project home page: www.
source-code.biz/base64coder/java
Author: Christian d'Heureuse, Inventec Informatik AG, Zurich, Switzerland
Multi-licensed: EPL / LGPL / GPL / AL / BSD.
| Modifier and Type | Field and Description |
|---|---|
| private static final char[] | |
| private static final byte[] | |
| private static final String |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static byte[] | |
| public static byte[] | Returns: An array containing the decoded data bytes.A character array containing the Base64 encoded data. in)Decodes a byte array from Base64 format. |
| public static byte[] | Returns: An array containing the decoded data bytes.A character array containing the Base64 encoded data. in, int Offset of the first character in iOff, int in to be processed.Number of characters to process in iLen)in, starting at iOff.Decodes a byte array from Base64 format. |
| public static byte[] | Returns: An array containing the decoded data bytes.A Base64 String to be decoded. s)Decodes a byte array from Base64 format and ignores line separators, tabs and blanks. |
| public static String | Returns: A String containing the decoded data.A Base64 String to be decoded. s)Decodes a string from Base64 format. |
| public static char[] | Returns: A character array containing the Base64 encoded data.An array containing the data bytes to be encoded. in)Encodes a byte array into Base64 format. |
| public static char[] | Returns: A character array containing the Base64 encoded data.An array containing the data bytes to be encoded. in, int Number of bytes to process in iLen)in.Encodes a byte array into Base64 format. |
| public static char[] | Returns: A character array containing the Base64 encoded data.An array containing the data bytes to be encoded. in, int Offset of the first byte in iOff, int in to be processed.Number of bytes to process in iLen)in, starting at iOff.Encodes a byte array into Base64 format. |
| public static String | Returns: A String containing the Base64 encoded data, broken into lines.An array containing the data bytes to be encoded. in)Encodes a byte array into Base 64 format and breaks the output into lines of 76 characters. |
| public static String | Returns: A String containing the Base64 encoded data, broken into lines.An array containing the data bytes to be encoded. in, int Offset of the first byte in iOff, int in to be processed.Number of bytes to be processed in iLen, int in, starting at iOff.Line length for the output data. Should be a multiple of 4. lineLen, String The line separator to be used to separate the output lines. lineSeparator)Encodes a byte array into Base 64 format and breaks the output into lines. |
| public static String | Returns: A String containing the Base64 encoded data.A String to be encoded. s)Encodes a string into Base64 format. |
| map1 | back to summary |
|---|---|
| private static final char[] map1 | |
| map2 | back to summary |
|---|---|
| private static final byte[] map2 | |
| systemLineSeparator | back to summary |
|---|---|
| private static final String systemLineSeparator | |
| Base64Coder | back to summary |
|---|---|
| private Base64Coder() | |
| decode | back to summary |
|---|---|
| public static byte[] decode(String s) Decodes a byte array from Base64 format. No blanks or line breaks are allowed within the Base64 encoded input data.
| |
| decode | back to summary |
|---|---|
| public static byte[] decode(char[] in) Decodes a byte array from Base64 format. No blanks or line breaks are allowed within the Base64 encoded input data.
| |
| decode | back to summary |
|---|---|
| public static byte[] decode(char[] in, int iOff, int iLen) Decodes a byte array from Base64 format. No blanks or line breaks are allowed within the Base64 encoded input data.
| |
| decodeLines | back to summary |
|---|---|
| public static byte[] decodeLines(String s) Decodes a byte array from Base64 format and ignores line separators, tabs and blanks. CR, LF,
Tab and Space characters are ignored in the input data. This method is compatible with
| |
| decodeString | back to summary |
|---|---|
| public static String decodeString(String s) Decodes a string from Base64 format. No blanks or line breaks are allowed within the Base64 encoded input data.
| |
| encode | back to summary |
|---|---|
| public static char[] encode(byte[] in) Encodes a byte array into Base64 format. No blanks or line breaks are inserted in the output.
| |
| encode | back to summary |
|---|---|
| public static char[] encode(byte[] in, int iLen) Encodes a byte array into Base64 format. No blanks or line breaks are inserted in the output.
| |
| encode | back to summary |
|---|---|
| public static char[] encode(byte[] in, int iOff, int iLen) Encodes a byte array into Base64 format. No blanks or line breaks are inserted in the output.
| |
| encodeLines | back to summary |
|---|---|
| public static String encodeLines(byte[] in) Encodes a byte array into Base 64 format and breaks the output into lines of 76 characters.
This method is compatible with
| |
| encodeLines | back to summary |
|---|---|
| public static String encodeLines(byte[] in, int iOff, int iLen, int lineLen, String lineSeparator) Encodes a byte array into Base 64 format and breaks the output into lines.
| |
| encodeString | back to summary |
|---|---|
| public static String encodeString(String s) Encodes a string into Base64 format. No blanks or line breaks are inserted. | |