ÓÃJ2ME½øÐÐÁªÍø - ±à³ÌÈëÃÅÍø
is = c.openInputStream();
¡¡¡¡¡¡¡¡¡¡¡¡ // Get the length and process the data
¡¡¡¡¡¡¡¡¡¡¡¡ int len = (int)c.getLength();
¡¡¡¡¡¡¡¡¡¡¡¡ int ch;
¡¡¡¡¡¡¡¡¡¡¡¡ while ((ch = is.read()) != -1) {
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ str.append((char)ch);
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ }
¡¡¡¡¡¡¡¡ } finally {
¡¡¡¡¡¡¡¡¡¡¡¡ if (is != null)
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ is.close();
¡¡¡¡¡¡¡¡¡¡¡¡ if (c != null)
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ c.close();
¡¡¡¡¡¡¡¡ }
// Before returning, the resultant String should be parsed to get Exchange Rate
String val = parse(str.toString());
System.out.println(val);
return val;
¡¡¡¡ }
}
»õ±ÒÖµºÍÆäËüÏà¹ØÐÅÏ¢²»¾Ã±ã³öÏÖÔÚÒƶ¯É豸µÄÓû§½çÃæÉÏ¡£Í¼ 2 ˵Ã÷ÁËÏÔʾµÄ½á¹û ¡£ ͼ 2. ÔÚÊÖ³ÖÉ豸ÉÏÔËÐеĻõ±Ò¶Ò»»Ó¦ÓóÌÐò ½áÊøÓï J2ME ÓÐÒ»ÖÖ¶ÀÌصÄÔÚÊÜÔ¼Êø»·¾³Öд¦ÀíÊý¾ÝÊäÈ룯Êä³öµÄ¾«¼ò·½Ê½¡£ÓÐÁËÕâÖÖ¹¦ÄÜ£¬ Ö§³Ö Java µÄÒƶ¯Åä¼þ¾Í²»ÔÙÊǼòµ¥µÄͨÐÅÉ豸ÁË£¬¶øÊÇÄܹ»³äµ±Î¢ÐÍä¯ÀÀÆ÷µÄÉ豸£¬Ëü ¿ÉÒÔÔÚÒƶ¯ÖÐÌṩÖØÒªµÄÐÅÏ¢¡£ |
ÁèÖڿƼ¼×¨ÒµÌṩ·þÎñÆ÷×âÓᢷþÎñÆ÷Íйܡ¢ÆóÒµÓʾ֡¢ÐéÄâÖ÷»úµÈ·þÎñ£¬¹«Ë¾ÍøÕ¾£ºhttp://www.lingzhong.cn ΪÁ˸ø¹ã´ó¿Í»§Á˽â¸ü¶àµÄ¼¼ÊõÐÅÏ¢£¬±¾¼¼ÊõÎÄÕÂÊÕ¼¯À´Ô´ÓÚÍøÂç,ÁèÖڿƼ¼×ðÖØÎÄÕÂ×÷ÕߵİæȨ£¬Èç¹ûÓÐÉæ¼°ÄãµÄ°æȨÓбØҪɾ³ýÄãµÄÎÄÕ£¬ÇëºÍÎÒÃÇÁªÏµ¡£ÒÔÉÏÐÅÏ¢ÓëÎÄÕÂÕýÎÄÊDz»¿É·Ö¸îµÄÒ»²¿·Ö,Èç¹ûÄúҪתÔر¾ÎÄÕÂ,Çë±£ÁôÒÔÉÏÐÅÏ¢£¬Ð»Ð»! |