com.blogspot.applications4android.comicreader.comics
Class TheDevilsPanties

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.IndexedComic
              extended by com.blogspot.applications4android.comicreader.comictypes.RandomIndexedComic
                  extended by com.blogspot.applications4android.comicreader.comics.TheDevilsPanties

public class TheDevilsPanties
extends RandomIndexedComic


Field Summary
 
Fields inherited from class com.blogspot.applications4android.comicreader.comictypes.RandomIndexedComic
mNextId, mPrevId
 
Fields inherited from class com.blogspot.applications4android.comicreader.comictypes.IndexedComic
mBound, mLatestId
 
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
TheDevilsPanties()
           
 
Method Summary
 java.lang.String getComicWebPageUrl()
          Get the main page url for the current comic series
protected  int getFirstId()
          Returns the first comic-id
protected  java.lang.String getFrontPageUrl()
          Return the front page URL from where to get the latest comic URL.
protected  int getIdFromStripUrl(java.lang.String url)
          Get the comic-id from strip URL
protected  int getNextStripId(java.io.BufferedReader br, java.lang.String url)
          Evaluate the next strip's index from the current strip's url
protected  int getPreviousStripId(java.io.BufferedReader br, java.lang.String url)
          Evaluate the previous strip's index from the current strip's url
protected  java.lang.String getRandUrl()
          Function to return the random url
 java.lang.String getStripUrlFromId(int num)
          Get the strip URL from the input comic-id.
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
protected  int parseForLatestId(java.io.BufferedReader reader)
          Helper function to parse the latest comic's html page in order to get the latest comic id.
protected  int parseForNextId(java.lang.String line, int def)
          Given a line containing the next strip's url, return the id
protected  int parseForPrevId(java.lang.String line, int def)
          Given a line containing the previous strip's url, return the id
 
Methods inherited from class com.blogspot.applications4android.comicreader.comictypes.RandomIndexedComic
getNextStripUrl, getPreviousStripUrl, getRandomStripUrl, setNextId, setPreviousId, urlsNotForCaching
 
Methods inherited from class com.blogspot.applications4android.comicreader.comictypes.IndexedComic
addException, dialogType, getBound, getCurrentId, getFirstStripUrl, getLatestId, getLatestStripUrl
 
Methods inherited from class com.blogspot.applications4android.comicreader.core.Comic
clearCache, clearHistory, currentHasImageText, currentTitleAsValidFilename, downloadCurrentStrip, getComicName, 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
 

Constructor Detail

TheDevilsPanties

public TheDevilsPanties()
Method Detail

getRandUrl

protected java.lang.String getRandUrl()
Description copied from class: RandomIndexedComic
Function to return the random url

Specified by:
getRandUrl in class RandomIndexedComic
Returns:
random url

getNextStripId

protected int getNextStripId(java.io.BufferedReader br,
                             java.lang.String url)
Description copied from class: RandomIndexedComic
Evaluate the next strip's index from the current strip's url

Specified by:
getNextStripId in class RandomIndexedComic
Parameters:
br - reader for the current strip's url connection
url - current strip's url
Returns:
next strip's index

getPreviousStripId

protected int getPreviousStripId(java.io.BufferedReader br,
                                 java.lang.String url)
Description copied from class: RandomIndexedComic
Evaluate the previous strip's index from the current strip's url

Specified by:
getPreviousStripId in class RandomIndexedComic
Parameters:
br - reader for the current strip's url connection
url - current strip's url
Returns:
previous strip's index

parseForLatestId

protected int parseForLatestId(java.io.BufferedReader reader)
                        throws ComicLatestException,
                               java.io.IOException
Description copied from class: IndexedComic
Helper function to parse the latest comic's html page in order to get the latest comic id.

Specified by:
parseForLatestId in class IndexedComic
Parameters:
reader - reader from which to parse for latest id
Returns:
latest comic id
Throws:
ComicLatestException
java.io.IOException

getStripUrlFromId

public java.lang.String getStripUrlFromId(int num)
Description copied from class: IndexedComic
Get the strip URL from the input comic-id.

Specified by:
getStripUrlFromId in class IndexedComic
Parameters:
num - the comic-id
Returns:
the strip URL

getIdFromStripUrl

protected int getIdFromStripUrl(java.lang.String url)
Description copied from class: IndexedComic
Get the comic-id from strip URL

Specified by:
getIdFromStripUrl in class IndexedComic
Parameters:
url - comic url
Returns:
the comic-id

getFrontPageUrl

protected java.lang.String getFrontPageUrl()
Description copied from class: IndexedComic
Return the front page URL from where to get the latest comic URL.

Specified by:
getFrontPageUrl in class IndexedComic
Returns:
front page URL

getComicWebPageUrl

public java.lang.String getComicWebPageUrl()
Description copied from class: Comic
Get the main page url for the current comic series

Specified by:
getComicWebPageUrl in class Comic
Returns:
desired 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

getFirstId

protected int getFirstId()
Description copied from class: IndexedComic
Returns the first comic-id

Overrides:
getFirstId in class IndexedComic
Returns:
first comic-id

parseForPrevId

protected int parseForPrevId(java.lang.String line,
                             int def)
Description copied from class: RandomIndexedComic
Given a line containing the previous strip's url, return the id

Specified by:
parseForPrevId in class RandomIndexedComic
Parameters:
line - line of interest
def - default value to be returned
Returns:
prev Id

parseForNextId

protected int parseForNextId(java.lang.String line,
                             int def)
Description copied from class: RandomIndexedComic
Given a line containing the next strip's url, return the id

Specified by:
parseForNextId in class RandomIndexedComic
Parameters:
line - line of interest
def - default value to be returned
Returns:
next Id