com.blogspot.applications4android.comicreader.core
Class ComicParser

java.lang.Object
  extended by com.blogspot.applications4android.comicreader.core.ComicParser
Direct Known Subclasses:
Comic

public abstract class ComicParser
extends java.lang.Object

Base class for parsing html files to get the strip info


Constructor Summary
ComicParser()
           
 
Method Summary
protected abstract  boolean htmlNeeded()
          Whether one needs to parse the html file in order to find the strip url
protected abstract  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
 java.lang.String parse(java.lang.String url, Strip strip)
          Main function responsible for downloading and reading a html page and returning the strip url
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComicParser

public ComicParser()
Method Detail

parse

public java.lang.String parse(java.lang.String url,
                              Strip strip)
                       throws ClientProtocolException,
                              java.io.IOException,
                              java.net.URISyntaxException
Main function responsible for downloading and reading a html page and returning the strip url

Parameters:
url - html page url
strip - the strip where to store the info
Returns:
the strip url
Throws:
ClientProtocolException
java.io.IOException
java.net.URISyntaxException

htmlNeeded

protected abstract boolean htmlNeeded()
Whether one needs to parse the html file in order to find the strip url

Returns:
true if html is needed, else false

parse

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

Parameters:
url - html page url
reader - reader
strip - the strip where to store the info
Returns:
the strip url
Throws:
java.io.IOException