org.apache.jasper.xmlparser

## Class XMLString

- java.lang.Object
- - org.apache.jasper.xmlparser.XMLString

- Direct Known Subclasses:
    XMLStringBuffer

  Deprecated.
  Will be removed in Tomcat 9.0.x onwards

      @Deprecated
      public class XMLString
      extends Object

  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.

  Author:
    Eric Ye, IBM, Andy Clark, IBM

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `char[]` | `ch` Deprecated. The character array.
    `int` | `length` Deprecated. The length of characters from the offset.
    `int` | `offset` Deprecated. The offset into the character array.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `XMLString()` Deprecated. Default constructor.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clear()` Deprecated. Resets all of the values to their defaults.
    `boolean` | `equals(String s)` Deprecated. Returns true if the contents of this XMLString structure and the specified string are equal.
    `void` | `setValues(char[] ch, int offset, int length)` Deprecated. Initializes the contents of the XMLString structure with the specified values.
    `void` | `setValues(XMLString s)` Deprecated. Initializes the contents of the XMLString structure with copies of the given string structure.
    `String` | `toString()` Deprecated.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### ch

          public char[] ch

      Deprecated.
      The character array.

    - #### offset

          public int offset

      Deprecated.
      The offset into the character array.

    - #### length

          public int length

      Deprecated.
      The length of characters from the offset.

  - ### Constructor Detail

    - #### XMLString

          public XMLString()

      Deprecated.
      Default constructor.

  - ### Method Detail

    - #### setValues

          public void setValues(char[] ch,
                       int offset,
                       int length)

      Deprecated.
      Initializes the contents of the XMLString structure with the specified values.
      Parameters:
        `ch` - The character array.
        `offset` - The offset into the character array.
        `length` - The length of characters from the offset.

    - #### setValues

          public void setValues(XMLString s)

      Deprecated.
      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.

      Parameters:
        `s` - The string

    - #### clear

          public void clear()

      Deprecated.
      Resets all of the values to their defaults.

    - #### equals

          public boolean equals(String s)

      Deprecated.
      Returns true if the contents of this XMLString structure and the specified string are equal.
      Parameters:
        `s` - The string to compare.
      Returns:
        `true` if equal

    - #### toString

          public String toString()

      Deprecated.
      Overrides:
        `toString` in class `Object`

Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.