Package jc.pbntools.download

Examples of jc.pbntools.download.HtmlTourDownloader


   * auto-detection.
   */
  static void downTour(String sLink, HtmlTourDownloader dloader, boolean bGui)
  {
    if (getWorkDir(bGui) == null) { return; }
    HtmlTourDownloader dloaders[];
    if (dloader == null)
      dloaders = getTourDownloaders();
    else
      dloaders = new HtmlTourDownloader[] { dloader };
    Download dwn = new Download(sLink, dloaders, bGui);
View Full Code Here


    public void setOutputWindow(SimplePrinter ow) {
      m_ow = ow;
    }
     
    public void run() {
      HtmlTourDownloader dloader = null;
      if (m_dloaders.length == 1) {
        dloader = m_dloaders[0];
        dloader.setOutputWindow(m_ow);
        if (!dloader.verify(m_sLink, false)) {
          return;
        }
      }
      else {
        for (HtmlTourDownloader dr: m_dloaders) {
          if (f.isDebugMode())
            m_ow.addLine("Trying reader: " + dr.getClass().getName());
          dr.setOutputWindow(m_ow);
          if (dr.verify(m_sLink, !f.isDebugMode())) {
            m_ow.addLine(
              getStr("msg.readerFound", dr.getClass().getName()));
            dloader = dr;
            break;
          }
        }
      }
      if (dloader == null) {
        m_ow.addLine(getStr("msg.noDealReader"));
        return;
      }
      try {
        dloader.fullDownload(true);
      }
      catch (DownloadFailedException e) {
        m_ow.addLine(e.getMessage());
        if (f.isDebugMode())
          e.printStackTrace();
View Full Code Here

TOP

Related Classes of jc.pbntools.download.HtmlTourDownloader

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.