|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.itextpdf.tool.xml.parser.XMLParserMemory
public class XMLParserMemory
Wrapper class for different things that need to be kept track of between different states.
Constructor Summary | |
---|---|
XMLParserMemory(boolean isHtml)
|
Method Summary | |
---|---|
StringBuilder |
comment()
Returns the xml comment buffer. |
StringBuilder |
current()
The current text buffer. |
void |
currentAttr(String attr)
Sets the encountered attribute. |
StringBuilder |
currentEntity()
Returns the current entity buffer. |
void |
currentTag(String content)
Set the encountered tag. |
void |
flushNameSpace()
Flushes the namespace memory. |
Map<String,String> |
getAttributes()
Returns a map of all attributes and their value found on the current tag. |
String |
getCurrentTag()
Returns the current tag. |
String |
getNameSpace()
Get the current namespace. |
boolean |
hasCurrentAttribute()
true if there is a currentAttribute |
char |
lastChar()
|
void |
lastChar(char c)
Set the last char |
void |
namespace(String ns)
Sets the current namespace. |
void |
putCurrentAttrValue(String content)
Sets the current attribute value and adds the attribute (if it's not null) to the attribute map. |
void |
resetBuffer()
Resets the ByteArrayOutputStream of this class. |
String |
whitespaceTag()
Returns last tag that needs to be taken into account for HTML Whitespace handling. Used by InsideTagHTMLState , only for HTML processing. |
void |
whitespaceTag(String tag)
Sets the last tag that needs to be taken into account for HTML Whitespace handling. Used by InsideTagHTMLState , only for HTML processing. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XMLParserMemory(boolean isHtml)
Method Detail |
---|
public void currentTag(String content)
content
- the tagpublic void currentAttr(String attr)
attr
- the attributepublic boolean hasCurrentAttribute()
public void putCurrentAttrValue(String content)
content
- the current attributes value.public StringBuilder current()
public String getCurrentTag()
public Map<String,String> getAttributes()
public StringBuilder currentEntity()
public StringBuilder comment()
public String whitespaceTag()
InsideTagHTMLState
, only for HTML processing.
public void whitespaceTag(String tag)
InsideTagHTMLState
, only for HTML processing.
tag
- the tagpublic void namespace(String ns)
ns
- the current namespacepublic void flushNameSpace()
public String getNameSpace()
public void resetBuffer()
public void lastChar(char c)
c
- the charpublic char lastChar()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |