lux.xml
Class Offsets
java.lang.Object
lux.xml.Offsets
public final class Offsets
- extends Object
This class stores the offsets of text nodes and character entities in serialized XML. It is
populated by SaxonDocBuilder and consumed by XmlTextTokenStream.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Offsets
public Offsets()
reset
public void reset()
addDelta
public void addDelta(int deltaLocation,
short delta)
addOffset
public void addOffset(int characterOffset)
getTextLocation
public int getTextLocation(int i)
- Parameters:
i - the index of the text node
- Returns:
- the character location in the input character stream of i'th text node.
getDeltaLocation
public int getDeltaLocation(int i)
- A delta is stored whenever the number of characters in the output token is not the same
as the number in the input character stream.
- Parameters:
i - the index of the delta
- Returns:
- the character location in the input character stream of the i'th delta.
getDeltaCount
public int getDeltaCount()
- Returns:
- the number of deltas found in the input stream
getDelta
public int getDelta(int i)
- Parameters:
i - the index of the delta
- Returns:
- the value of the i'th delta
Copyright © 2013. All Rights Reserved.