src/main/java/org/jivesoftware/smack/util/StringUtils.java
public static String encodeBase64(byte[] data, int offset, int len,
            boolean lineBreaks) {
        return Base64.encodeBytes(data, offset, len,
                (lineBreaks ? Base64.NO_OPTIONS : Base64.DONT_BREAK_LINES));
    }
public static String encodeBase64(byte[] data, int offset, int len,
            boolean lineBreaks) {
        return Base64.encodeBytes(data, offset, len,
                (lineBreaks ? Base64.NO_OPTIONS : Base64.DONT_BREAK_LINES));
    }
Encodes a byte array into a bse64 String.

@param data
The byte arry to encode.
@param offset
the offset of the bytearray to begin encoding at.
@param len
the length of bytes to encode.
@param lineBreaks
True if the encoding should contain line breaks and false if
it should not.
@return A base64 encoded String.