public final class HTMLHandler extends javax.swing.text.html.HTMLEditorKit.ParserCallback implements ContentHandler
HTMLHandler
Content handler for HTML documents.
DBT_FILEFOMAT, EXCEL_FILEFOMAT, PDF_FILEFOMAT, PPT_FILEFOMAT, RTF_FILEFOMAT, TEXT_HTML_FILEFOMAT, VERSION_2003, VERSION_2007, WORD_FILEFOMAT| Constructor and Description |
|---|
HTMLHandler()
Constructor - initializes variables
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getAbstracts() |
java.lang.String |
getAuthor()
Parse Content.
|
java.lang.String |
getCategories()
Return categories (from META tags)
|
java.lang.String |
getChannel() |
java.lang.String |
getContents()
Return contents
|
java.lang.String |
getCopyright() |
java.lang.String |
getDescription()
Return description (from META tags)
|
java.lang.String |
getDockind() |
long |
getDocwtime() |
java.lang.String |
getFileFormat()
返回文件类型
|
java.lang.String |
getFileType()
针对aspx文件出现乱码问题而加的方法
|
java.lang.String |
getHREF()
Return META HREF
|
java.lang.String |
getKeywords()
Return keywords (from META tags)
|
java.util.List |
getLinks()
Return links
|
long |
getPublished()
Return published date (from META tag)
|
boolean |
getRobotFollow()
Return boolean true if links are to be followed
|
boolean |
getRobotIndex()
Return boolean true if this is to be indexed
|
java.lang.String |
getSecondtitle() |
java.lang.String |
getSite() |
java.lang.String |
getSubtitle() |
java.lang.String |
getTitle()
Return page title
|
void |
handleAnchor(javax.swing.text.MutableAttributeSet attribs)
Handle Anchor tags
|
void |
handleEndTag(javax.swing.text.html.HTML.Tag tag,
int pos)
Closing tag
|
void |
handleMeta(javax.swing.text.MutableAttributeSet attribs)
Handle META tags
|
void |
handleSimpleTag(javax.swing.text.html.HTML.Tag tag,
javax.swing.text.MutableAttributeSet attribs,
int pos)
Handle standalone tags
|
void |
handleStartTag(javax.swing.text.html.HTML.Tag tag,
javax.swing.text.MutableAttributeSet attribs,
int pos)
Opening tag
|
void |
handleText(char[] text,
int pos)
Handle page text
|
static void |
main(java.lang.String[] args) |
void |
parse(java.io.InputStream in)
Parse Content.
|
void |
parse(java.util.Map map) |
void |
setCopyright(java.lang.String copyright) |
void |
setDocwtime(long docwtime) |
void |
setFileType(java.lang.String fileType) |
public java.lang.String getAuthor()
getAuthor in interface ContentHandlerpublic java.lang.String getCategories()
getCategories in interface ContentHandlerpublic java.lang.String getFileType()
public void setFileType(java.lang.String fileType)
public java.lang.String getContents()
getContents in interface ContentHandlerpublic java.lang.String getDescription()
getDescription in interface ContentHandlerpublic java.lang.String getHREF()
getHREF in interface ContentHandlerpublic java.lang.String getKeywords()
getKeywords in interface ContentHandlerpublic java.util.List getLinks()
getLinks in interface ContentHandlerpublic long getPublished()
getPublished in interface ContentHandlerpublic boolean getRobotFollow()
getRobotFollow in interface ContentHandlerpublic boolean getRobotIndex()
getRobotIndex in interface ContentHandlerpublic java.lang.String getTitle()
getTitle in interface ContentHandlerpublic void handleAnchor(javax.swing.text.MutableAttributeSet attribs)
public void handleEndTag(javax.swing.text.html.HTML.Tag tag,
int pos)
handleEndTag in class javax.swing.text.html.HTMLEditorKit.ParserCallbackpublic void handleMeta(javax.swing.text.MutableAttributeSet attribs)
public void handleSimpleTag(javax.swing.text.html.HTML.Tag tag,
javax.swing.text.MutableAttributeSet attribs,
int pos)
handleSimpleTag in class javax.swing.text.html.HTMLEditorKit.ParserCallbackpublic void handleStartTag(javax.swing.text.html.HTML.Tag tag,
javax.swing.text.MutableAttributeSet attribs,
int pos)
handleStartTag in class javax.swing.text.html.HTMLEditorKit.ParserCallbackpublic void handleText(char[] text,
int pos)
handleText in class javax.swing.text.html.HTMLEditorKit.ParserCallbackpublic void parse(java.io.InputStream in)
parse in interface ContentHandlerpublic java.lang.String getFileFormat()
getFileFormat in interface ContentHandlerpublic static void main(java.lang.String[] args)
public java.lang.String getAbstracts()
getAbstracts in interface ContentHandlerpublic java.lang.String getChannel()
getChannel in interface ContentHandlerpublic java.lang.String getDockind()
getDockind in interface ContentHandlerpublic java.lang.String getSecondtitle()
getSecondtitle in interface ContentHandlerpublic java.lang.String getSite()
getSite in interface ContentHandlerpublic java.lang.String getSubtitle()
getSubtitle in interface ContentHandlerpublic java.lang.String getCopyright()
getCopyright in interface ContentHandlerpublic void setCopyright(java.lang.String copyright)
public long getDocwtime()
getDocwtime in interface ContentHandlerpublic void setDocwtime(long docwtime)
public void parse(java.util.Map map)
parse in interface ContentHandler