|
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.erowid.sperowider.htmlshredding.HTMLShredder
Takes an InputStreamReader and turns the data so streamed into
an ordered collection of HTML elements. These elements include HTMLComment
, HTMLKeywordTag
HTMLMetaTag
, HTMLTag
, and HTMLText
.
Constructor Summary | |
HTMLShredder()
Creates a new HTMLShredder |
Method Summary | |
void |
appendHTMLElement(HTMLElement element)
Adds a new HTML element to the end of the shredder |
void |
deleteHTMLElement(int index)
Deletes an HTML element at the given position, and moves the rest to the left |
int |
findMetaTag(String metaName)
Finds the index of the HTMLMetaTag with the given name property. |
int |
findTag(int startIndex,
String tagName)
Returns the index of the first tag found with the passed in name, starting at the start index. |
Iterator |
getElements()
Returns an iterator representing the HTML elements in order |
HTMLElement |
getHTMLElement(int index)
Returns the HTML element at a given position |
int |
getHTMLElementCount()
Returns the current count of elements |
Logger |
getLogger()
Returns shredder logger |
void |
insertHTMLElement(HTMLElement element,
int index)
Inserts a new HTML element before the element at the given position, and moves all others to the right. |
void |
insertHTMLShredder(HTMLShredder shredder,
int index)
Inserts the contents of an HTML Shredder before the element at the given position, and moves all others to the right. |
void |
shred(BufferedReader isr)
Takes an InputStreamReader and cracks that into the contained collection of HTML elements. |
void |
write(Writer w)
Writes the HTMLElement as HTML to the passed in Writer. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public HTMLShredder()
Method Detail |
public Logger getLogger()
public Iterator getElements()
public void write(Writer w) throws IOException
HTMLElement
write
in interface HTMLElement
w
-
IOException
public HTMLElement getHTMLElement(int index)
public int getHTMLElementCount()
public void appendHTMLElement(HTMLElement element)
public void insertHTMLShredder(HTMLShredder shredder, int index)
public void insertHTMLElement(HTMLElement element, int index)
public void deleteHTMLElement(int index)
public void shred(BufferedReader isr)
public int findTag(int startIndex, String tagName)
public int findMetaTag(String metaName)
HTMLMetaTag
with the given name property.
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |