摘要: public class MainActivity extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } public void openActivity(View v){ //... 阅读全文
posted @ 2014-01-10 21:32 天之涯0204 阅读(316) 评论(0) 推荐(0) 编辑
摘要: public class MainActivity extends Activity { private EditText pathText; private TextView resultView; private Button downloadButton; private Button stopbutton; private ProgressBar progressBar; //hanlder的作用是用于往创建Hander对象所在的线程所绑定的消息队列发送消息 private Handler handler = new UIHander(); ... 阅读全文
posted @ 2014-01-10 16:54 天之涯0204 阅读(178) 评论(0) 推荐(0) 编辑
摘要: public class MulThreadDownloader { public static void main(String[] args) throws Exception { String path = "http://192.168.1.100:8080/web/QQWubiSetup.exe"; int threadsize = 3; new MulThreadDownloader().download(path, threadsize); } private void download(String path, int... 阅读全文
posted @ 2014-01-10 11:55 天之涯0204 阅读(292) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2014-01-10 11:03 天之涯0204 阅读(135) 评论(0) 推荐(0) 编辑