비동기식 html 다운 연습중인데요 conn.getResponseCode() == HttpURLConnection.HTTP_OK여기서 ok가 안나오는거 같아요...
어디가 잘못된걸까요 ㅠㅠ
package my.android.com;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;

import android.app.Activity;
import android.app.ProgressDialog;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

public class AsysnDownHtml extends Activity {
 ProgressDialog mProgress;
 DownThread mThread;
 String mResult;
 /** Called when the activity is first created. */
 @Override
 public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.main);
  Button btn = (Button) findViewById(R.id.Button01);
  btn.setOnClickListener(new View.OnClickListener() {
   @Override
   public void onClick(View v) {
    // TODO Auto-generated method stub
    mProgress = ProgressDialog.show(AsysnDownHtml.this, "Wite", "Downloading");
    mThread= new DownThread();
    mThread.start();

   }
  });
 }

 class DownThread extends Thread {

  public DownThread() {
  }

  public void run() {
   Log.d("mytag", "runintag");
   StringBuilder html = new StringBuilder();
   try {
    URL url = new URL("http://www.naver.com");
    HttpURLConnection conn = (HttpURLConnection)url.openConnection();
    Log.d("mytag", "conncomplete");
    if (conn != null) {
     Log.d("mytag", "conn!=null");
     conn.setConnectTimeout(10000);
     conn.setUseCaches(false);
     if (conn.getResponseCode() == HttpURLConnection.HTTP_OK) { /*여기서 ok가안나와요*/
      Log.d("mytag", "http_ok");
      BufferedReader br = new BufferedReader(
        new InputStreamReader(conn.getInputStream()));
      for (;;) {
       String line = br.readLine();
       if (line == null)break;
       html.append(line + '\n');
      }
      Log.d("mytag", "intag");
      br.close();
      mResult =html.toString();
     }
     conn.disconnect();
    }
   } catch (Exception e) { ;}
   mAfterDown.sendEmptyMessage(0);
  }
 }
 Handler mAfterDown= new Handler(){
  @Override
  public void handleMessage(Message msg) {
   // TODO Auto-generated method stub
   mProgress.dismiss();
   EditText result=(EditText)findViewById(R.id.EditText01);
   result.setText(mResult);
  }
  
 };

}