Beispiel #1
0
  public synchronized void getDownInfo(DownLoadInfo downInfo) {
    try {
      String mediainfo = GetCurDownloadInfo(downInfo.getDownUrl());
      // int outspeed;
      // float outPercent;
      // long  outFileSize;
      String tmp[] = mediainfo.split("&");
      String speed = tmp[0];
      String percent = tmp[1];

      downInfo.setDownSpeed(Integer.parseInt(speed));
      downInfo.setDownProgress((int) Float.parseFloat(percent));

    } catch (Exception e) {
      // TODO: handle exception
      e.printStackTrace();
    }
  }