Android Base64 Encode convertToBase64(byte[] in)

Here you can find the source of convertToBase64(byte[] in)

Description

convert To Base

Declaration

private static String convertToBase64(byte[] in)
            throws UnsupportedEncodingException 

Method Source Code

//package com.java2s;
import java.io.UnsupportedEncodingException;

import android.util.Base64;

public class Main {
    private static String convertToBase64(byte[] in)
            throws UnsupportedEncodingException {
        if (in == null)
            return null;

        return new String(Base64.encode(in, Base64.URL_SAFE
                | Base64.NO_PADDING), "UTF8");
    }/*from w w  w  .  j  a  v  a  2s  .  co m*/
}

Related

  1. encodeBase64(String input)
  2. encryptToBase64Text(String key, String src)
  3. generateBase64String(String inString)
  4. ImageBase64Decode(String base64_str)
  5. longKeyId2Base64String(long keyId)
  6. base64StringKeyId2Long(String keyId)