public String convertBytesToString(byte[] btSource) {
    int i = 0;
    String strDest = "", strTmp = "";    if (btSource == null)return null;
    try {
      for (i = 0; i < btSource.length; i++) {
        strTmp = Integer.toHexString( (int) btSource[i]);
        if (strTmp.length() <= 1)
          strTmp = "0" + strTmp; //仅有一位时,前面补0
        if (btSource[i] < 0)
          strTmp = strTmp.substring(strTmp.length() - 2); //????????        strDest += strTmp;
      }
    }
    catch (Exception e) {
      strDest = null;
    }
    return strDest;
  }
字节数组转string,不直接new string(byte[])就可以啦吗,何必这样?