com.silverpeas.mailinglist.service.util
Class Html2Text
java.lang.Object
javax.swing.text.html.HTMLEditorKit.ParserCallback
com.silverpeas.mailinglist.service.util.Html2Text
- All Implemented Interfaces:
- HtmlCleaner
public class Html2Text
- extends HTMLEditorKit.ParserCallback
- implements HtmlCleaner
HTML parser, used to extract text form the HTML.
- Author:
- Emmanuel Hugonnet
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Html2Text
public Html2Text()
- Constructor.
Html2Text
public Html2Text(int maxSize)
- Constructor.
- Parameters:
maxSize
- the maximum size of the extracted text.
setSummarySize
public void setSummarySize(int maxSize)
- Specified by:
setSummarySize
in interface HtmlCleaner
handleStartTag
public void handleStartTag(HTML.Tag t,
MutableAttributeSet a,
int pos)
- Overrides:
handleStartTag
in class HTMLEditorKit.ParserCallback
handleError
public void handleError(String errorMsg,
int pos)
- Overrides:
handleError
in class HTMLEditorKit.ParserCallback
handleEndTag
public void handleEndTag(HTML.Tag t,
int pos)
- Overrides:
handleEndTag
in class HTMLEditorKit.ParserCallback
parse
public void parse(Reader in)
throws IOException
- Specified by:
parse
in interface HtmlCleaner
- Throws:
IOException
handleText
public void handleText(char[] text,
int pos)
- Overrides:
handleText
in class HTMLEditorKit.ParserCallback
handleEndOfLineString
public void handleEndOfLineString(String eol)
- Overrides:
handleEndOfLineString
in class HTMLEditorKit.ParserCallback
handleComment
public void handleComment(char[] data,
int pos)
- Overrides:
handleComment
in class HTMLEditorKit.ParserCallback
handleSimpleTag
public void handleSimpleTag(HTML.Tag t,
MutableAttributeSet a,
int pos)
- Overrides:
handleSimpleTag
in class HTMLEditorKit.ParserCallback
getSummary
public String getSummary()
- Specified by:
getSummary
in interface HtmlCleaner
Copyright © 2016 Silverpeas. All Rights Reserved.