Computers/Language java

bytearray 를 string 으로 (from bytearray to string)

emzei 2011. 4. 12. 20:04

    /*
     * This method converts an byte array to a String object.
     */

    
    public void convertByteArrayToString() {
        
        byte[] byteArray = new byte[] {877987464646};
        
        String value = new String(byteArray);
        
        System.out.println(value);
    }




출처:http://www.javadb.com/convert-byte-array-to-string


'Computers > Language java' 카테고리의 다른 글

Exception Handling  (0) 2011.04.20
String class  (0) 2011.04.20
Access specifier / Modifier  (0) 2011.04.10
Interface / polymorphism / Event Handling / Inheritance / GUI  (0) 2011.04.10
week11. Input/Output and Exception Handling  (0) 2011.04.10