## net.i2p.router.web
Class NewsFetcher

    java.lang.Object
      net.i2p.router.web.NewsFetcher

All Implemented Interfaces:
  EepGet.StatusListener, java.lang.Runnable

public class NewsFetcher
extends java.lang.Object
implements java.lang.Runnable, EepGet.StatusListener

Task to periodically look for updates to the news.xml, and to keep track of whether that has an announcement for a new version.

Method Summary
`void` `attemptFailed(java.lang.String url, long bytesTransferred, long bytesRemaining, int currentAttempt, int numRetries, java.lang.Exception cause)`
`void` `bytesTransferred(long alreadyTransferred, int currentWrite, long bytesTransferred, long bytesRemaining, java.lang.String url)`
`void` `fetchNews()`
`static NewsFetcher` `getInstance(I2PAppContext ctx)`
`void` `headerReceived(java.lang.String url, int attemptNum, java.lang.String key, java.lang.String val)`
`void` `run()`
`void` `transferComplete(long alreadyTransferred, long bytesTransferred, long bytesRemaining, java.lang.String url, java.lang.String outputFile, boolean notModified)`
`void` `transferFailed(java.lang.String url, long bytesTransferred, long bytesRemaining, int currentAttempt)`
`boolean` `updateAvailable()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getInstance

    public static final NewsFetcher getInstance(I2PAppContext ctx)

### updateAvailable

    public boolean updateAvailable()

### run

    public void run()

  Specified by:
    `run` in interface `java.lang.Runnable`

### fetchNews

    public void fetchNews()

### attemptFailed

    public void attemptFailed(java.lang.String url,
                              long bytesTransferred,
                              long bytesRemaining,
                              int currentAttempt,
                              int numRetries,
                              java.lang.Exception cause)

  Specified by:
    `attemptFailed` in interface `EepGet.StatusListener`

### bytesTransferred

    public void bytesTransferred(long alreadyTransferred,
                                 int currentWrite,
                                 long bytesTransferred,
                                 long bytesRemaining,
                                 java.lang.String url)

  Specified by:
    `bytesTransferred` in interface `EepGet.StatusListener`

### transferComplete

    public void transferComplete(long alreadyTransferred,
                                 long bytesTransferred,
                                 long bytesRemaining,
                                 java.lang.String url,
                                 java.lang.String outputFile,
                                 boolean notModified)

  Specified by:
    `transferComplete` in interface `EepGet.StatusListener`

### transferFailed

    public void transferFailed(java.lang.String url,
                               long bytesTransferred,
                               long bytesRemaining,
                               int currentAttempt)

  Specified by:
    `transferFailed` in interface `EepGet.StatusListener`

### headerReceived

    public void headerReceived(java.lang.String url,
                               int attemptNum,
                               java.lang.String key,
                               java.lang.String val)

  Specified by:
    `headerReceived` in interface `EepGet.StatusListener`