org.hermit.android.net
Class TableFetcher

java.lang.Object
  extended by java.lang.Thread
      extended by org.hermit.android.net.WebFetcher
          extended by org.hermit.android.net.TableFetcher
All Implemented Interfaces:
java.lang.Runnable

public class TableFetcher
extends WebFetcher

Concrete instance of WebFetcher which fetches tabular data from the web. Lines in the file are parsed into fields and passed to the caller in a ContentValues object.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.hermit.android.net.WebFetcher
WebFetcher.FetchException, WebFetcher.Listener
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class org.hermit.android.net.WebFetcher
dataClient, dataUrls, killed, newerThanDate, timeout
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Method Summary
protected  void handle(java.net.URL url, java.net.URLConnection conn, java.io.BufferedReader readc)
          Fetch a page of data from the given BufferedReader.
 
Methods inherited from class org.hermit.android.net.WebFetcher
fetch, handle, kill, killAll, queue, run
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

handle

protected void handle(java.net.URL url,
                      java.net.URLConnection conn,
                      java.io.BufferedReader readc)
               throws WebFetcher.FetchException,
                      java.io.IOException
Fetch a page of data from the given BufferedReader.

Overrides:
handle in class WebFetcher
Parameters:
url - The URL we're reading.
conn - The current connection to the URL.
readc - The BufferedReader to read from.
Throws:
FetchException - Some problem was detected.
java.io.IOException - An I/O error occurred.
WebFetcher.FetchException