看某编码方法是否支持,可以用编码方法从byte数组中创建字符串
请问怎么实现举个例子?
我用拿个编码方法?
byte[]     temp1,temp2;
temp1   =   yourstring.getBytes("8859-1");
temp2   =   yourstring.getBytes("gb2312");
String   compstring1,compstring2;
compstring1   =   new   String(temp1);
compstring2   =   new   String(temp2);
if(yourstring.equals(temp1))
{
      //8859-1;
}
else
{
      //gb2312;
}
可以吗