|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object uxparser.XContent uxparser.XText
public final class XText
XText is the XContent element child used to store character data. XText is used to model both CDATA sections and normal character data.
Constructor Summary | |
---|---|
XText()
Create empty text. |
|
XText(char[] data)
Create text with specified char buffer using length of data.length. |
|
XText(char[] data,
int length)
Create text with specified char buffer and length. |
|
XText(java.lang.String string)
Create text with specified String. |
Method Summary | |
---|---|
void |
append(char[] buf,
int off,
int len)
Append the specified string to the end of the character data. |
void |
append(int c)
Append the specified character to the end of the character data. |
void |
append(java.lang.String s)
Append the specified string to the end of the character data. |
XText |
copy()
Make a new cloned copy of this XText instance. |
char[] |
data()
Get a direct reference to the character data buffer. |
boolean |
isCDATA()
Return true if this XText models a CDATA section of data. |
int |
length()
Get the length of the character data. |
void |
set(int index,
int c)
Set the character at the specified index. |
void |
setCDATA(boolean cdata)
Set the CDATA flag. |
void |
setLength(int length)
Set the length of valid characters in the buffer. |
java.lang.String |
string()
Get the character data as a string. |
java.lang.String |
toString()
Return string() . |
void |
write(XWriter out)
Write to the specified XWriter stream. |
Methods inherited from class uxparser.XContent |
---|
equals, parent |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public XText(char[] data, int length)
public XText(char[] data)
public XText(java.lang.String string)
public XText()
Method Detail |
---|
public final boolean isCDATA()
public final void setCDATA(boolean cdata)
public final java.lang.String string()
public final int length()
public final char[] data()
public final void append(int c)
public final void append(java.lang.String s)
public final void append(char[] buf, int off, int len)
public final void set(int index, int c)
java.lang.ArrayIndexOutOfBoundsException
- if index >= length().public final void setLength(int length)
public final XText copy()
public void write(XWriter out)
write
in class XContent
public java.lang.String toString()
string()
.
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |