public class CodeTesting { System.getProperties().put("file.encoding","iso8859-1");
  System.getProperties().list(System.out);
public static void main(String[] args)throws Exception { String str="中国"; for(int i=0;i<str.length();i++)
{System.out.println(Integer.toHexString((int)str.charAt(i)));}
byte buf[]=str.getBytes();
for(int t=0;t<buf.length;t++)
{System.out.println(Integer.toHexString(buf[t]));}
/* for(int a=0;a<buf.length;a++)
{System.out.write(buf[a]);
}
System.out.println():*/
System.out.write(buf,0,buf.length); }
编译时System.getProperties().put("file.encoding","iso8859-1");
  System.getProperties().list(System.out);有错误,请高手指教!