|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectceleboss.HTMLload.HTMLParser
This class uses a HTMLDataSource to load details.
| Constructor Summary | |
protected |
HTMLParser(java.io.InputStream in)
Creates a parser that will extract information from a HTML file representing the Celebrity details. |
| Method Summary | |
void |
close()
Close the associated stream. |
protected static float |
convertMoney(java.lang.String txt)
Helper method converts a raw text to a money value. |
protected static float |
convertPerc(java.lang.String txt)
This helper method converts a raw text to a percentage |
protected java.lang.String |
extractTitledValue(java.lang.String title)
Extract the text value next to a property title. |
protected char |
getChar()
This is a simple helper method that strips carriage returns from incoming chars. |
protected int |
getMillions()
This method extract the number of millions the next sequecne of HTML describes. |
protected java.lang.String |
getNextValue()
Get the next raw text value from the stream |
protected void |
setReturnTags(boolean b)
Change whether this parser should return the HTML tags |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
protected HTMLParser(java.io.InputStream in)
in - Input stream containig raw HTML.| Method Detail |
protected static float convertMoney(java.lang.String txt)
txt - Raw text
protected static float convertPerc(java.lang.String txt)
txt - Raw text
public void close()
throws java.io.IOException
java.io.IOException - Problem closing.
protected java.lang.String extractTitledValue(java.lang.String title)
throws java.io.IOException
title - Search target
java.io.IOException - Problem reading stream.
protected char getChar()
throws java.io.IOException
java.io.IOException - Problem reading stream
protected int getMillions()
throws java.io.IOException
java.io.IOException - Something wrong with source stream
protected java.lang.String getNextValue()
throws java.io.IOException
java.io.IOException - Problem with stream getting valueprotected void setReturnTags(boolean b)
b - New setting.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||