01: package com.jclark.xml.tok;
02:
03: /**
04: * Represents information returned by the tokenizing methods in
05: * <code>Encoding</code>.
06: *
07: * @see Encoding#tokenizeContent
08: * @see Encoding#tokenizeProlog
09: * @see Encoding#tokenizeAttributeValue
10: * @see Encoding#tokenizeEntityValue
11: * @version $Revision: 1.4 $ $Date: 1998/06/16 03:56:35 $
12: */
13: public class Token {
14: int tokenEnd = -1;
15: int nameEnd = -1;
16: char refChar1 = 0;
17: char refChar2 = 0;
18:
19: public final int getTokenEnd() {
20: return tokenEnd;
21: }
22:
23: protected final void setTokenEnd(int i) {
24: tokenEnd = i;
25: }
26:
27: public final int getNameEnd() {
28: return nameEnd;
29: }
30:
31: protected final void setNameEnd(int i) {
32: nameEnd = i;
33: }
34:
35: public final char getRefChar() {
36: return refChar1;
37: }
38:
39: public final void getRefCharPair(char[] ch, int off) {
40: ch[off] = refChar1;
41: ch[off + 1] = refChar2;
42: }
43: }
|