public static String encode(final String input, final boolean urlSafeEncoding) {
		return new String(encode(input.getBytes(charsetUTF8), urlSafeEncoding), charsetISOLatin1);
	}
public static String encode ( final String input , final boolean urlSafeEncoding ) { return new String ( encode ( input . getBytes ( charsetUTF8 ) , urlSafeEncoding ) , charsetISOLatin1 ) ; }
Encode to Base64

@param input
@param urlSafeEncoding
@return