org.databene.html
Class DefaultHTMLTokenizer
java.lang.Object
org.databene.html.DefaultHTMLTokenizer
- All Implemented Interfaces:
- HTMLTokenizer
public class DefaultHTMLTokenizer
- extends java.lang.Object
- implements HTMLTokenizer
Default implementation of an HTMLTokenizer.
Created: 15.06.2007 05:56:21
- Author:
- Volker Bergmann
|
Method Summary |
java.util.Map<java.lang.String,java.lang.String> |
attributes()
|
java.lang.String |
name()
|
int |
nextToken()
|
void |
readUntil(java.lang.String endText)
|
void |
readUntil(java.lang.String delimiter,
boolean includeDelimiter)
|
void |
readUntil(java.lang.String delimiter,
boolean caseSensitive,
boolean includeDelimiter)
|
java.lang.String |
text()
|
int |
tokenType()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultHTMLTokenizer
public DefaultHTMLTokenizer(java.io.Reader reader)
nextToken
public int nextToken()
throws java.io.IOException,
java.text.ParseException
- Specified by:
nextToken in interface HTMLTokenizer
- Throws:
java.io.IOException
java.text.ParseException
tokenType
public int tokenType()
- Specified by:
tokenType in interface HTMLTokenizer
- Returns:
- if it's a kind of tag then the tag name, else null
name
public java.lang.String name()
- Specified by:
name in interface HTMLTokenizer
text
public java.lang.String text()
- Specified by:
text in interface HTMLTokenizer
- Returns:
- the text that constitutes the current token as read from the source
attributes
public java.util.Map<java.lang.String,java.lang.String> attributes()
- Specified by:
attributes in interface HTMLTokenizer
- Returns:
- a map with all attributes of the token.
In case of non-tag tokens or empty tags, an empty map is returned.
readUntil
public void readUntil(java.lang.String endText)
throws java.io.IOException
- Throws:
java.io.IOException
readUntil
public void readUntil(java.lang.String delimiter,
boolean includeDelimiter)
throws java.io.IOException
- Throws:
java.io.IOException
readUntil
public void readUntil(java.lang.String delimiter,
boolean caseSensitive,
boolean includeDelimiter)
throws java.io.IOException
- Throws:
java.io.IOException
Copyright © 2010. All Rights Reserved.