Page 471 - 2
P. 471

Log.d(tag,mue.getMessage());
                   }catch (SAXException se){
                       Log.d(tag,se.getMessage());
                   }catch (IOException ioe){
                       Log.d(tag,ioe.getMessage());
                   }
                   return mBluetooth_data;
               }


               public InputStream getInputStreamUsingHTTP(URL url){
                   InputStream input=null;
                   Log.d(tag,"getinputstreamusinghttp()");
                   try{
                       HttpURLConnection conn = (HttpURLConnection) url.openConnection();
                       Log.d(tag,"conn  생성됨");
                       conn.setRequestMethod("GET");
                       Log.d(tag,"setRequestMethod");
                       conn.setDoInput(true);
                       Log.d(tag,"setDoInput");
                       conn.setDoOutput(true);
                       Log.d(tag,"setDoOutput");
                       conn.setUseCaches(false);
                       Log.d(tag,"setUseCaches");
                       conn.setAllowUserInteraction(false);
                       Log.d(tag,"setAllowUserInteraction");
                       //int resCode = conn.getResponseCode();
                       Log.d(tag,"conn  객체 완성");
                       input = conn.getInputStream();


                   }catch (IOException ioe){
                       Log.d(tag,ioe.getMessage());
                   }
                   return input;
               }

               public void processDocument(Document doc,double lon,double lat){
                   Element docEle = doc.getDocumentElement();


                   String city = "";
                   String pub = "";
                   String tmp = "";
                   String wf = "";


                   NodeList nodelist = docEle.getElementsByTagName("data");
                   if((nodelist != null) && (nodelist.getLength() > 0)){
                          try{
                              //  데이터
                                 Element description = (Element) nodelist.item(0);
                                 if (description != null) {
                                        Geocoder geocoder = new Geocoder(mcontext, Locale.getDefault());


                                                         - 471 -
   466   467   468   469   470   471   472   473   474   475   476