static String copyValueOf(char[] data) 
          Returns a String that represents the character sequence in the array specified.

解决方案 »

  1.   

    我没说清我的意思,我是问:
    对char[]可用String.copyValueOf(char[])
    对byte[]有没有类似的方法???
    好像没有String.copyValueOf(byte[])吧?!
      

  2.   

    String
    public String(byte[] bytes)
    Constructs a new String by decoding the specified array of bytes using the platform's default charset. The length of the new String is a function of the charset, and hence may not be equal to the length of the byte array. 
    The behavior of this constructor when the given bytes are not valid in the default charset is unspecified. The CharsetDecoder class should be used when more control over the decoding process is required. 
    Parameters:
    bytes - the bytes to be decoded into characters 
    Throws: 
    NullPointerException - if bytes is null
    Since: 
    JDK1.1 
      

  3.   

    你是否想将byte[]转化成String?