解决方案 »

  1.   

    试着这么做:
    byte b=(byte)255;
    System.out.println(b);
    char c=(char)b;
    System.out.println(c);
    String s=new String(c+"");
    System.out.println(s);
    byte byt[]=s.getBytes();
    System.out.println(byt.length);
    输出结果:
    -1
    ?
    ?
    1
      

  2.   

    有点错误,byt中输出是63,不过楼主你说的是保存ASCII,是在1到127的范围,对这范围中的数,完全没问题的