Android Array to String Convert bytetoString(byte[] b)

Here you can find the source of bytetoString(byte[] b)

Description

byteto String

Declaration

public static String bytetoString(byte[] b) 

Method Source Code

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

public class Main {
    public final static String DEFAULT_CHARSET = "UTF-8";

    public static String bytetoString(byte[] b) {
        try {//from   w  w  w . ja  v  a  2 s  .  co  m
            return new String(b, DEFAULT_CHARSET);
        } catch (UnsupportedEncodingException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        return null;
    }
}

Related

  1. toString(String s)
  2. toString(int[][] iArray)
  3. toString(long[][] iArray)
  4. toString(Object[] obj)
  5. byteArrayToString(byte[] a)
  6. hexToString(byte[] ids)
  7. toString(byte[] ba)
  8. toString(byte[] ba, int offset, int length)
  9. byteToString(byte[] str)