Android Utililty Methods Byte Array to String Convert

List of utility methods to do Byte Array to String Convert

Description

The list of methods to do Byte Array to String Convert are organized into topic(s).

Method

StringconvertBytesToString(byte[] value)
Convert a byte array to a hex encoded string.
return convertBytesToString(value, value.length);
StringconvertBytesToString(byte[] value, int len)
Convert a byte array to a hex encoded string.
char[] buff = new char[len + len];
char[] hex = HEX;
for (int i = 0; i < len; i++) {
    int c = value[i] & 0xff;
    buff[i + i] = hex[c >> 4];
    buff[i + i + 1] = hex[c & 0xf];
return new String(buff);
...
StringbyteTOString(byte[] in)
byte TO String
InputStream is = byteTOInputStream(in);
return InputStreamTOString(is);
StringbyteTOString(byte[] in)
byte TO String
InputStream is = byteTOInputStream(in);
return InputStreamTOString(is);
StringbyteTOString(byte[] in)
byte TO String
InputStream is = byteTOInputStream(in);
return InputStreamTOString(is);
StringbyteTOString(byte[] in)
byte TO String
InputStream is = byteTOInputStream(in);
return InputStreamTOString(is);
StringbyteTOString(byte[] in)
byte array to String
InputStream is = byteTOInputStream(in);
return InputStreamTOString(is);
StringbyteTOString(byte[] in, String encoding)
byte TO String
InputStream is = byteTOInputStream(in);
return InputStreamTOString(is, encoding);
StringbyteToString(byte[] in)
This function converts byte[] into a String
InputStream ins = byteTOInputStream(in);
return InputStreamTOString(ins);
StringbyteToString(int[] byteData)
byte To String
String str = "";
for (int i = 0; i < 4; i++) {
    int count = 0;
    for (int j = 0; j < 16; j++) {
        int pow = 1;
        for (int m = 15; m > j; m--) {
            pow *= 2;
        count += byteData[16 * i + j] * pow;
    if (count != 0) {
        str += "" + (char) (count);
return str;