Commits

Anonymous committed 93fb51f

TCP,UDP,TCP6,UDP6通信状態が取得可能になった

Comments (0)

Files changed (1)

src/foo/sample/GetIP/GetIP.java

 			if(proc != null)
 			{
 				Log.d("debug","proc is succsessfylly worked");
-               br = new BufferedReader(new InputStreamReader(proc.getInputStream()), 4056);
+               br = new BufferedReader(new InputStreamReader(proc.getInputStream()), 40056);
                try{
-            	   int counter = 0;
+            	   int counter = -1;
                while(true)
                {
+            	   Log.d("debug","Loog Counter = " + String.valueOf(counter));
 					outStr = br.readLine();
-            	  if (outStr != null && outStr.length() != 0)
+            	  if (outStr != null)
             		  {
+            		  			counter++;
             		  	if(counter == 0)
             		  		{
-            		  			counter++;
             		  			continue;
             		  		}
+            		  	if(outStr.length() == 0)
+            		  	{
+            		  		continue;
+            		  	}
             		  	
             		  	Log.d("debug",outStr);
             		  	StringTokenizer stk = new StringTokenizer(outStr, ": ");
 							Log.d("debug","App\' s path:"+pm.getApplicationInfo(packageName, 0).publicSourceDir);
 							output.add("App\' s path:"+pm.getApplicationInfo(packageName, 0).publicSourceDir);
 						} catch (NameNotFoundException e) {
+							Log.d("debug","Exception:NameNotFound");
 							e.printStackTrace();
 						}
             		  	//connectionData.debugInfo()
     	return ret;
     }
 	public void showNetInfo(List<String> output) {
+		getTCP6Info(output);
 		getUDP6Info(output);
-		getUDP6Info(output);
-		getUDP6Info(output);
+		getUDPInfo(output);
 		getTCPInfo(output);
 	}
 }