public class XPathValueMapper extends XmlPathMapper
XmlPathMapper, followed by
a value token. Element and attribute string values are represented by 8-character hashes of their first N characters.
If the value fits in 8 characters, it is padded with nulls (unicode 0). The hash algorithm is analogous to that used by
java.lang.String, but arithmetic is done with shorts rather than ints, and we keep more of them so that
the likelihood of collisions is very small.| Modifier and Type | Field and Description |
|---|---|
static int |
HASH_SIZE |
currentPath, currentQName| Constructor and Description |
|---|
XPathValueMapper() |
| Modifier and Type | Method and Description |
|---|---|
ArrayList<char[]> |
getPathValues() |
void |
handleEvent(XMLStreamReader reader,
int eventType)
This method receives StAX events.
|
static char[] |
hashString(char[] value,
char[] buf) |
void |
reset()
reinitialize any internal state and prepare the handler for re-use
|
encodeQName, getAttQNameCounts, getEltQNameCounts, getEventAttQName, getPathCounts, isNamespaceAware, setNamespaceAwarepublic static final int HASH_SIZE
public ArrayList<char[]> getPathValues()
public void reset()
StAXHandlerreset in interface StAXHandlerreset in class XmlPathMapperpublic void handleEvent(XMLStreamReader reader, int eventType)
StAXHandlerhandleEvent in interface StAXHandlerhandleEvent in class XmlPathMapperreader - the reader from which events are being readeventType - the XML stream event typepublic static char[] hashString(char[] value,
char[] buf)
Copyright © 2013. All Rights Reserved.