byte[] b=...
String str=new String(b);

解决方案 »

  1.   

    b为Byte[]
    String s ;
    for (int i=0;i<b.length;i++){
        s + = b[i].toString;
    }
      

  2.   

    private String byte2hex(byte[] bytes){
            String hs="";
            String stmp="";
            for (int n=0;n<bytes.length;n++){
                stmp=(java.lang.Integer.toHexString(bytes[n] & 0XFF));
                if(stmp.length()==1) hs=hs+"0"+stmp;
                   else hs=hs+stmp;
            }
            return hs.toLowerCase();
        }