title: Load file from url problem - connection refused
body: <p>I have piece of code in my  Activity ( I start this from emulator ) </p>
  
  <pre><code>public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.main);
      TextView txt=(TextView)this.findViewById(R.id.lbl);
      try {
  
              URL url = new URL("http://localhost/test.json");
              URLConnection urlconnection = url.openConnection();
              long l = urlconnection.getContentLength();
  
              BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));
              String line;
              StringBuffer buffer=new StringBuffer();
              while ((line = in.readLine()) != null)
              {
                 buffer.append(line);
              }
              in.close();
              System.out.println("bufer="+buffer.toString());
              txt.setText(buffer.toString());
  
  
          } catch (Exception exc) {
  
             exc.printStackTrace();
  
          }  
  }
  </code></pre>
  
  <p>and my Manifest looks like</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="test_android.test"
        android:versionCode="1"
        android:versionName="1.0"&gt;
  
  
      &lt;application android:icon="@drawable/icon" android:label="@string/app_name"&gt;
          &lt;activity android:name=".test_android"
                    android:label="@string/app_name"&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN" /&gt;
                  &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
  
      &lt;/application&gt;
       &lt;uses-permission android:name="android.permission.INTERNET"&gt;&lt;/uses-permission&gt;
  &lt;/manifest&gt;
  </code></pre>
  
  <p>I have wamp server and test.json in my www directory but I always get error CONNECTION REFUSED. What is wrong ?</p>