|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.milyn.delivery.sax.SAXText
public class SAXText
SAX Text.
This class provides a wrapper around the char array supplied by the SAXParser/XMLReader. It help provide an optimization by allowing the process to avoid String construction where possible. NOTE: References to instances of this type should not be cached. If you need to cache the character data housed in this class, you should use either thegetText() or toString() methods.
| Constructor Summary | |
|---|---|
protected |
SAXText()
|
|
SAXText(char[] characters,
int offset,
int length,
TextType type)
|
| Method Summary | |
|---|---|
String |
getText()
Get the raw text, unwrapped. |
TextType |
getType()
Get the text type (comment, cdata etc). |
protected void |
setText(char[] characters,
int offset,
int length,
TextType type)
|
String |
toString()
Get the "wrapped" text as a String. |
void |
toWriter(Writer writer)
Write the text to the supplied writer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected SAXText()
public SAXText(char[] characters,
int offset,
int length,
TextType type)
| Method Detail |
|---|
protected void setText(char[] characters,
int offset,
int length,
TextType type)
public String getText()
toString() implementation because
it doesn't wrap the test based on it's type.
public TextType getType()
public String toString()
type.
See getType().
toString in class Object
public void toWriter(Writer writer)
throws IOException
type.
writer - The writer.
IOException - Write exception.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||