xstream解析xml,生成没问题,解析老是报错,原来代码是
return (T) xstream.fromXML(new FileReader(filepath));
将fileReader改成 FileInputStream,即
return (T) xstream.fromXML(new FileInputStream(filepath));
就好了,还是编码的问题
xstream解析xml,生成没问题,解析老是报错,原来代码是
return (T) xstream.fromXML(new FileReader(filepath));
将fileReader改成 FileInputStream,即
return (T) xstream.fromXML(new FileInputStream(filepath));
就好了,还是编码的问题