StringÀÇ ¹®ÀÚ¿À» hexÄÚµå·Î ¹Ù²ã¾ß ÇÒ °æ¿ì°¡ ÀÖ½À´Ï´Ù.
½ºÆ®¸µÀ» ³×Æ®¿öÅ©¿¡ Àü¼ÛÇÏ¿© ¹Þ´Â´Ù´øÁö µîÀÇ °æ¿ì µî...
public static String ToHex4charters(String string) {
String a = "";
for (int i = 0; i < string.length(); i++) {
a += String.format("0x%02X ", (int) string.charAt(i));
}
return a;
}
public static String ToHex2charters(String string) {
String a = "";
for (int i = 0; i < string.length(); i++) {
a += String.format("%02X ", (int) string.charAt(i));
}
return a;
}
À§ÀÇ Æã¼ÇÀ» »ç¿ëÇϽøé, °£´ÜÈ÷ String -> hex ÄÚµå·Î º¯°æ °¡´ÉÇÕ´Ï´Ù.
* ±ÛÀ» µî·ÏÇϽǶ§ ²À ÇÊ¿äÇÑ °æ¿ì°¡ ¾Æ´Ï¸é °³ÀÎÁ¤º¸¸¦ ³²±âÁö ¸¶¼¼¿ä ^^ (¿¬¶ôó,À̸ÞÀÏÁÖ¼Ò,Áֹεî·Ï¹øÈ£ µî)