Android examples for java.lang:Byte Array
Converts a byte array to a String
import android.util.Log; import java.io.UnsupportedEncodingException; import java.math.BigInteger; public class Main{ /**/*from w w w .jav a 2s.c o m*/ * Converts a byte array to a String * @param data byte[] of data to encode * @return encoded data */ public static String bin2String(byte[] data) { String encoded_data = null; try { encoded_data = new String(data, ENCODER); } catch (UnsupportedEncodingException e) { Log.d("debug", e.toString()); } return encoded_data; } }