public class SAXText extends Object
getText()
or toString()
methods.Modifier | Constructor and Description |
---|---|
protected |
SAXText() |
|
SAXText(char[] characters,
int offset,
int length,
TextType type) |
protected |
SAXText(String text,
TextType type) |
Modifier and Type | Method and Description |
---|---|
protected Object |
clone()
Clone this SAXText object.
|
char[] |
getCharacters()
Get the underlying character buffer.
|
int |
getLength()
Get the character buffer length (in the
character buffer ) of the text a
associated with this SAXText instance. |
int |
getOffset()
Get the character offset (in the
character buffer ) of the text a
associated with this SAXText instance. |
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.
|
void |
toWriter(Writer writer,
boolean encodeSpecialChars)
Write the text to the supplied writer.
|
protected SAXText()
public SAXText(char[] characters, int offset, int length, TextType type)
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()
public char[] getCharacters()
getOffset()
,
getLength()
public int getOffset()
character buffer
) of the text a
associated with this SAXText instance.getCharacters()
,
getLength()
public int getLength()
character buffer
) of the text a
associated with this SAXText instance.getCharacters()
,
getOffset()
public void toWriter(Writer writer) throws IOException
type
.writer
- The writer.IOException
- Write exception.public void toWriter(Writer writer, boolean encodeSpecialChars) throws IOException
type
.writer
- The writer.encodeSpecialChars
- Encode special XML characters.IOException
- Write exception.Copyright © 2020. All rights reserved.