develog

byte, int, 한글 본문

Dev/Java

byte, int, 한글

냐옴 2014. 7. 26. 18:13

byte[] bytes = "한글".getBytes("EUC-KR");

for (int i = 0; i < bytes.length; i++) {

    byte b = bytes[i];

    System.out.print(b);

    System.out.print("\t");

    System.out.println(Integer.toBinaryString(0xFF & b));

}


System.out.println();

System.out.println(new String(new byte[] {-57, -47, -79, -37}, "EUC-KR"));

'Dev > Java' 카테고리의 다른 글

[Java] byte <-> int  (0) 2014.07.27
[Java] bit & shift 연산  (0) 2014.07.26
Quartz Clustering  (0) 2014.06.24
The Tomcat JDBC Connection Pool  (0) 2014.06.12
hMailServer 설치 (Windows 7 64 bit)  (0) 2014.05.22
Comments