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.
| Modifier and Type | Field and Description |
|---|---|
| public char[] | ch
The character array. |
| public static final int | DEFAULT_SIZE
Default buffer size (32). |
| public int | length
The length of characters from the offset. |
| public int | offset
The offset into the character array. |
| Access | Constructor and Description |
|---|---|
| public | |
| public | XMLString(char[]
The character array. ch, int The offset into the character array. offset, int The length of characters from the offset. length)Constructs an XMLString structure preset with the specified values. |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| public void | append(char[]
the char array ch, int the offset offset, int the length length)Appends a number of characters to the buffer. |
| public void | |
| public void | |
| public boolean | equals(char[]
The character array. ch, int The offset into the character array. offset, int The length of characters from the offset. length)Returns true if the contents of this XMLString structure and the specified array are equal. |
| public boolean | |
| public void | setValues(char[]
The character array. ch, int The offset into the character array. offset, int The length of characters from the offset. length)Initializes the contents of the XMLString structure with the specified values. |
| public void | |
| public String |
| ch | back to summary |
|---|---|
| public char[] ch The character array. | |
| DEFAULT_SIZE | back to summary |
|---|---|
| public static final int DEFAULT_SIZE Default buffer size (32). | |
| length | back to summary |
|---|---|
| public int length The length of characters from the offset. | |
| offset | back to summary |
|---|---|
| public int offset The offset into the character array. | |
| XMLString | back to summary |
|---|---|
| public XMLString() Default constructor. | |
| XMLString | back to summary |
|---|---|
| public XMLString(char[] ch, int offset, int length) Constructs an XMLString structure preset with the specified values.
| |
| XMLString | back to summary |
|---|---|
| public XMLString(XMLString string) Constructs an XMLString structure with copies of the values in the given structure. Note This does not copy the character array; only the reference to the array is copied.
| |
| append | back to summary |
|---|---|
| public void append(char c) Appends a char to the buffer.
| |
| append | back to summary |
|---|---|
| public void append(String s) Appends a string to the buffer.
| |
| append | back to summary |
|---|---|
| public void append(char[] ch, int offset, int length) Appends a number of characters to the buffer.
| |
| append | back to summary |
|---|---|
| public void append(XMLString s) Appends another buffer to this buffer
| |
| clear | back to summary |
|---|---|
| public void clear() Resets all of the values to their defaults. | |
| equals | back to summary |
|---|---|
| public boolean equals(char[] ch, int offset, int length) Returns true if the contents of this XMLString structure and the specified array are equal.
| |
| equals | back to summary |
|---|---|
| public boolean equals(String s) Returns true if the contents of this XMLString structure and the specified string are equal.
| |
| setValues | back to summary |
|---|---|
| public void setValues(char[] ch, int offset, int length) Initializes the contents of the XMLString structure with the specified values.
| |
| setValues | back to summary |
|---|---|
| public void setValues(XMLString s) Initializes the contents of the XMLString structure with copies of the given string structure. Note This does not copy the character array; only the reference to the array is copied. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Returns a string representation of this object. | |