现在有个字节码数组item(100)  as    Byte,其中前几位(未知)保存了一个字符串对应的字节码,请问如何才能得到这个字符串?谢谢  

解决方案 »

  1.   

    试试这个
    String str = new String( byteName );
      

  2.   

    哦,补充一下
    加上一句
    str = str.trim();
      

  3.   

    回XKP,String str = new String( byteName );这句是否可用
    for i=0 to 100
    str=str+Chr(bytename(i))
    next i
    代替?我觉得可以吧,没什么分别吧?
      

  4.   

    Chr()????????!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    这是VB?VC?pascal?还是??????????
    我觉得那一句应该可以用
      

  5.   

    String(byte[] bytes)
              Constructs a new String by decoding the specified array of bytes using the platform's default charset.
      

  6.   

    哇,问错地方了,应该在vB基础类里面问的
    没看清怎么跑到java里来了,见谅,见谅。
      

  7.   

    哇,问错地方了,应该在vB基础类里面问的
    没看清怎么跑到java里来了,见谅,见谅。汗·············