byte[]数组如何转换成String
public static final String arrayToString(byte[] bytes)
{
StringBuffer buff = new StringBuffer();
for (int i = 0; i < bytes.length; i++)
{
buff.append(bytes[i] + " ");
}
return buff.toString();
}
时间: 2024-11-14 12:48:57
public static final String arrayToString(byte[] bytes)
{
StringBuffer buff = new StringBuffer();
for (int i = 0; i < bytes.length; i++)
{
buff.append(bytes[i] + " ");
}
return buff.toString();
}