java.lang.Object | |
↳ | org.apache.xerces.xni.XMLString |
Known Direct Subclasses |
This class is used as a structure to pass text contained in the underlying character buffer of the scanner. The offset and length fields allow the buffer to be re-used without creating new character arrays.
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.
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
ch | The character array. | ||||||||||
length | The length of characters from the offset. | ||||||||||
offset | The offset into the character array. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Default constructor.
| |||||||||||
Constructs an XMLString structure preset with the specified
values.
| |||||||||||
Constructs an XMLString structure with copies of the values in
the given structure.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Resets all of the values to their defaults.
| |||||||||||
Returns true if the contents of this XMLString structure and
the specified array are equal.
| |||||||||||
Returns true if the contents of this XMLString structure and
the specified string are equal.
| |||||||||||
Initializes the contents of the XMLString structure with copies
of the given string structure.
| |||||||||||
Initializes the contents of the XMLString structure with the
specified values.
| |||||||||||
Returns a string representation of this object.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
The character array.
The length of characters from the offset.
The offset into the character array.
Default constructor.
Constructs an XMLString structure preset with the specified values.
ch | The character array. |
---|---|
offset | The offset into the character array. |
length | The length of characters from the offset. |
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.
string | The XMLString to copy. |
---|
Resets all of the values to their defaults.
Returns true if the contents of this XMLString structure and the specified array are equal.
ch | The character array. |
---|---|
offset | The offset into the character array. |
length | The length of characters from the offset. |
Returns true if the contents of this XMLString structure and the specified string are equal.
s | The string to compare. |
---|
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.
Initializes the contents of the XMLString structure with the specified values.
ch | The character array. |
---|---|
offset | The offset into the character array. |
length | The length of characters from the offset. |