XMLStringBuffer (Apache Tomcat 8.5.57 API Documentation)

org.apache.jasper.xmlparser

## Class XMLStringBuffer

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

- Deprecated.
  Will be removed in Tomcat 9.0.x onwards

      @Deprecated
      public class XMLStringBuffer
      extends XMLString

  XMLString is a structure used to pass character arrays. However, XMLStringBuffer is a buffer in which characters can be appended and extends XMLString so that it can be passed to methods expecting an XMLString object. This is a safe operation because it is assumed that any callee will not modify the contents of the XMLString structure.

  The contents of the string are managed by the string buffer. As characters are appended, the string buffer will grow as needed.

  Note: Never set the `ch`, `offset`, and `length` fields directly. These fields are managed by the string buffer. In order to reset the buffer, call `clear()`.

  Author:
    Andy Clark, IBM, Eric Ye, IBM

- - ### Field Summary

    - ### Fields inherited from class org.apache.jasper.xmlparser.XMLString

      `ch, length, offset`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `XMLStringBuffer()` Deprecated. Build a string buffer with the default size (32).
    `XMLStringBuffer(int size)` Deprecated. Build a string buffer with the specified size.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `append(char c)` Deprecated. Append character.
    `void` | `append(char[] ch, int offset, int length)` Deprecated. Append characters.
    `void` | `append(String s)` Deprecated. Append string.
    `void` | `append(XMLString s)` Deprecated. Append XML string
    `void` | `clear()` Deprecated. Clears the string buffer.

    - ### Methods inherited from class org.apache.jasper.xmlparser.XMLString

      `equals, setValues, setValues, toString`

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

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

- - ### Constructor Detail

    - #### XMLStringBuffer

          public XMLStringBuffer()

      Deprecated.
      Build a string buffer with the default size (32).

    - #### XMLStringBuffer

          public XMLStringBuffer(int size)

      Deprecated.
      Build a string buffer with the specified size.
      Parameters:
        `size` - The backing array size

  - ### Method Detail

    - #### clear

          public void clear()

      Deprecated.
      Clears the string buffer.
      Overrides:
        `clear` in class `XMLString`

    - #### append

          public void append(char c)

      Deprecated.
      Append character.
      Parameters:
        `c` - The character to append

    - #### append

          public void append(String s)

      Deprecated.
      Append string.
      Parameters:
        `s` - The string to append

    - #### append

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

      Deprecated.
      Append characters.
      Parameters:
        `ch` - The character array
        `offset` - The offset
        `length` - The length

    - #### append

          public void append(XMLString s)

      Deprecated.
      Append XML string
      Parameters:
        `s` - The string

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