Android Base64 Encode encodedBase64(String currentString)

Here you can find the source of encodedBase64(String currentString)

Description

encoded Base

Declaration

public static String encodedBase64(String currentString) 

Method Source Code

//package com.java2s;
import java.io.UnsupportedEncodingException;
import android.util.Base64;

public class Main {
    public static String encodedBase64(String currentString) {

        byte[] commentData = null;

        try {//from w  ww .  j  a v  a2  s.  co  m
            commentData = currentString.trim().getBytes("UTF-8");
        } catch (UnsupportedEncodingException e1) {
            e1.printStackTrace();
        }
        String b = Base64.encodeToString(commentData, Base64.NO_WRAP);
        return b;

    }
}

Related

  1. encodeBase64(String value)
  2. encode(String s)
  3. encode(final String str)
  4. encode(String source)
  5. encode(String str)
  6. toBase64(String value)
  7. toBase64(byte[] bytes)
  8. base64Encode(byte[] bytes)
  9. base64Digest(String input)