2011-03-15 4 views

답변

0
String s="http://199.199.199.199/webservices/login.php"; 
int b = (int)s.charAt(i++); 
if ((b>=0x30 && b<=0x39) || (b>=0x41 && b<=0x5A) || (b>=0x61 && b<=0x7A)) { 
tmp.append((char)b); 
} 
else { 
tmp.append("%"); 
if (b <= 0xf) tmp.append("0"); 
tmp.append(Integer.toHexString(b)); 
} 
Dialog.alert(tmp.toString()); 
} 
3

많은 자유롭게 사용할 수있는 URL 인코더 중 하나를 사용하십시오. "blackberry url encoder"또는 "java me url encoder"또는 비슷한 것을 검색하십시오. 예 : here's onehere's another.

URL 인코딩과 디코딩이 너무 유용하다는 이유로 MIDP 또는 BlackBerry API에 포함되지 않은 이유는 언제나 신비입니다.

관련 문제