Android Base64 Byte Array Encode encode(byte[] arr)

Here you can find the source of encode(byte[] arr)

Description

Converts byte array to String

License

Open Source License

Parameter

Parameter Description
arr - The array to be encoded

Return

- The returned String

Declaration

public static String encode(byte[] arr) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import android.util.Base64;

public class Main {
    /**/*  w  w w. ja  va2s .  co  m*/
     * Converts byte array to String
     * @param arr - The array to be encoded
     * @return - The returned String
     */
    public static String encode(byte[] arr) {
        return Base64.encodeToString(arr, Base64.DEFAULT);
    }
}

Related

  1. encode(byte[] bytes)
  2. encode(byte[] data)
  3. encode(byte[] data)
  4. encodeWebSafe(byte[] source, boolean doPadding)
  5. encode(byte[] bytes)
  6. encode(byte[] data)