public class XMLString extends Object
Note: Methods that are passed an XMLString structure should consider the contents read-only and not make any modifications to the contents of the buffer. The method receiving this structure should also not modify the offset and length if this structure (or the values of this structure) are passed to another method.
Note: Methods that are passed an XMLString structure are required to copy the information out of the buffer if it is to be saved for use beyond the scope of the method. The contents of the structure are volatile and the contents of the character buffer cannot be assured once the method that is passed this structure returns. Therefore, methods passed this structure should not save any reference to the structure or the character array contained in the structure.
| Constructor and Description |
|---|
XMLString()
Constructs an XMLString.
|
XMLString(char[] ch,
int offset,
int length)
Constructs an XMLString structure preset with the specified values.
|
| Modifier and Type | Method and Description |
|---|---|
void |
append(char c) |
void |
append(char[] str,
int offset,
int len) |
void |
append(String str) |
void |
append(XMLString xmlStr) |
void |
appendTo(StringBuilder stringBuilder) |
void |
characters(ContentHandler contentHandler) |
char |
charAt(int index) |
XMLString |
clear()
Resets.
|
XMLString |
clone() |
void |
comment(LexicalHandler lexicalHandler) |
void |
delete(int start,
int end) |
boolean |
endsWith(String string) |
char[] |
getChars()
Deprecated.
|
void |
ignorableWhitespace(ContentHandler contentHandler) |
boolean |
isWhitespace() |
int |
length() |
void |
reduceToContent(String startMarker,
String endMarker) |
String |
toString() |
void |
trimWhitespaceAtEnd() |
public XMLString()
public XMLString(char[] ch,
int offset,
int length)
ch - The character array.offset - The offset into the character array.length - The length of characters from the offset.public void append(char c)
public void append(String str)
public void append(XMLString xmlStr)
public void append(char[] str,
int offset,
int len)
public char charAt(int index)
public int length()
public boolean endsWith(String string)
@Deprecated public char[] getChars()
public XMLString clear()
public boolean isWhitespace()
public void trimWhitespaceAtEnd()
public void delete(int start,
int end)
public void appendTo(StringBuilder stringBuilder)
public void characters(ContentHandler contentHandler) throws SAXException
SAXExceptionpublic void ignorableWhitespace(ContentHandler contentHandler) throws SAXException
SAXExceptionpublic void comment(LexicalHandler lexicalHandler) throws SAXException
SAXExceptionCopyright © 2023 HtmlUnit. All rights reserved.