Encodes a raw byte array into a BASE64 String representation i accordance with RFC 2045. @param sArr The bytes to convert. If null or length 0 an empty array will be returned. @param lineSep Optional "\r\n" after 76 characters, unless end of file. No
(byte[] sArr, boolean lineSep)
| 535 | * @return A BASE64 encoded array. Never <code>null</code>. |
| 536 | */ |
| 537 | String encodeToString(byte[] sArr, boolean lineSep) { |
| 538 | // Reuse char[] since we can't create a String incrementally anyway and StringBuffer/Builder would be slower. |
| 539 | return new String(encodeToChar(sArr, lineSep)); |
| 540 | } |
| 541 | |
| 542 | /* |
| 543 | * Decodes a BASE64 encoded <code>String</code>. All illegal characters will be ignored and can handle both strings with |