String str1 = “Hello World!”;

// 변수 str1의 바이트 값

// 72101108108111328711111410810033

bytes[] buffers = str1.getBytes(); 

// 바이트 배열 자체의 문자열 값

// [B@ca0b6

String buffersArrayString = buffers.toString();

// 바이트 배열을 문자열로 변환한 값

// Hello World!

String str2 = new String(buffers);


참조 : http://roadrunner.tistory.com/139


+ Recent posts