com.blogspot.applications4android.comicreader.comictypes
Class DailyKingFeaturesComic

java.lang.Object
  extended by com.blogspot.applications4android.comicreader.core.ComicParser
      extended by com.blogspot.applications4android.comicreader.core.Comic
          extended by com.blogspot.applications4android.comicreader.comictypes.DailyComic
              extended by com.blogspot.applications4android.comicreader.comictypes.DailyKingFeaturesComic
Direct Known Subclasses:
ArcticCircle, BeetleBailey, Bleeker, BrilliantMindOfEdisonLee, Gil, PajamaDiaries, Popeye, RetailComic, RhymesWithOrange, TinasGroove, Zits

public abstract class DailyKingFeaturesComic
extends DailyComic

Base class for all comics supported by KingFeatures comics (like Zits, BeetleBailey, ...)


Field Summary
protected  java.util.Calendar mFirstCal
          calendar for the first comic
protected  java.util.Calendar mLatestCal
          calendar for the latest comic
 
Fields inherited from class com.blogspot.applications4android.comicreader.comictypes.DailyComic
m_zone, mBound
 
Fields inherited from class com.blogspot.applications4android.comicreader.core.Comic
DIALOG_DATE, DIALOG_NUMBER, mFirstUid, mLatestUid, mPrevSessionUid, NAV_CURRENT, NAV_FIRST, NAV_LATEST, NAV_LATEST_FORCE, NAV_NEXT, NAV_PREV_SESSION, NAV_PREVIOUS, NAV_RANDOM, PROPS, TYPE_CACHING, TYPE_FAVORITE, TYPE_LATEST, TYPE_PREV_SESSION, TYPE_PREVIEW
 
Constructor Summary
DailyKingFeaturesComic()
           
 
Method Summary
protected  java.util.Calendar getFirstCalendar()
          Get a Calendar instance for the first comic strip.
protected  java.util.Calendar getLatestCalendar()
          Get a Calendar instance for the latest comic strip.
protected  java.util.Calendar getTimeFromUrl(java.lang.String url)
          Helper function to convert the comic html URL into Calendar instance.
 java.lang.String getUrlFromTime(java.util.Calendar cal)
          Helper function to convert the Calendar instance into url
protected  boolean htmlNeeded()
          Whether one needs to parse the html file in order to find the strip url
protected  java.lang.String parse(java.lang.String url, java.io.BufferedReader reader, Strip strip)
          Function to read every line from the reader and extract strip-info
 
Methods inherited from class com.blogspot.applications4android.comicreader.comictypes.DailyComic
addException, dialogType, getBound, getCurrentCal, getFirstStripUrl, getLatestStripUrl, getNextStripUrl, getPreviousStripUrl, getRandomStripUrl, urlsNotForCaching
 
Methods inherited from class com.blogspot.applications4android.comicreader.core.Comic
clearCache, clearHistory, currentHasImageText, currentTitleAsValidFilename, downloadCurrentStrip, getComicName, getComicWebPageUrl, getCurrentStrip, getDefaultZoom, getFirstStrip, getLatestStrip, getLatestStripForcefully, getLaunchType, getName, getNextStrip, getPreviousSessionStrip, getPreviousStrip, getRandomStrip, getStripFromUrl, hasPreviousSession, hasUid, isCurrentFavorite, isCurrentFirstStrip, isCurrentLatestStrip, navigateStrip, queryUid, readOnlyUnread, readProperties, setCacheEnabled, setComicName, setCurrentAsFavorite, setDefaultZoom, setLaunchType, writeProperties
 
Methods inherited from class com.blogspot.applications4android.comicreader.core.ComicParser
parse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mLatestCal

protected java.util.Calendar mLatestCal
calendar for the latest comic


mFirstCal

protected java.util.Calendar mFirstCal
calendar for the first comic

Constructor Detail

DailyKingFeaturesComic

public DailyKingFeaturesComic()
Method Detail

getLatestCalendar

protected java.util.Calendar getLatestCalendar()
Description copied from class: DailyComic
Get a Calendar instance for the latest comic strip.

Specified by:
getLatestCalendar in class DailyComic
Returns:
Calendar instance for the latest strip

getFirstCalendar

protected java.util.Calendar getFirstCalendar()
Description copied from class: DailyComic
Get a Calendar instance for the first comic strip.

Specified by:
getFirstCalendar in class DailyComic
Returns:
Calendar instance for the first strip

getTimeFromUrl

protected java.util.Calendar getTimeFromUrl(java.lang.String url)
Description copied from class: DailyComic
Helper function to convert the comic html URL into Calendar instance.

Specified by:
getTimeFromUrl in class DailyComic
Parameters:
url - comic html url
Returns:
the calendar instance.

getUrlFromTime

public java.lang.String getUrlFromTime(java.util.Calendar cal)
Description copied from class: DailyComic
Helper function to convert the Calendar instance into url

Specified by:
getUrlFromTime in class DailyComic
Parameters:
cal - calendar instance
Returns:
comic url

htmlNeeded

protected boolean htmlNeeded()
Description copied from class: ComicParser
Whether one needs to parse the html file in order to find the strip url

Specified by:
htmlNeeded in class ComicParser
Returns:
true if html is needed, else false

parse

protected java.lang.String parse(java.lang.String url,
                                 java.io.BufferedReader reader,
                                 Strip strip)
                          throws java.io.IOException
Description copied from class: ComicParser
Function to read every line from the reader and extract strip-info

Specified by:
parse in class ComicParser
Parameters:
url - html page url
reader - reader
strip - the strip where to store the info
Returns:
the strip url
Throws:
java.io.IOException