## org.exist.util
Class XMLString

    java.lang.Object
      org.exist.util.XMLString

All Implemented Interfaces:
  java.lang.CharSequence, java.lang.Comparable

public final class XMLString
extends java.lang.Object
implements java.lang.CharSequence, java.lang.Comparable

Faster string implementation which uses a CharArrayPool to pool the backing char arrays.

Field Summary
`static int` `DEFAULT_CAPACITY`
`static int` `SUPPRESS_BOTH`
`static int` `SUPPRESS_LEADING_WS`
`static int` `SUPPRESS_NONE`
`static int` `SUPPRESS_TRAILING_WS`

Constructor Summary
`XMLString()`
`XMLString(char[] ch)`
`XMLString(char[] ch, int start, int length)`
`XMLString(int capacity)`

Method Summary
`XMLString` `append(char ch)`
`XMLString` `append(char[] ch)`
`XMLString` `append(char[] ch, int offset, int len)`
`XMLString` `append(java.lang.String str)`
`XMLString` `append(XMLString other)`
`char` `charAt(int pos)`
`int` `compareTo(java.lang.Object o)`
`XMLString` `delete(int start, int count)`
`boolean` `equals(java.lang.Object anObject)`
`int` `hashCode()`
`XMLString` `insert(int offset, java.lang.String data)`
`boolean` `isWhitespaceOnly()`
`int` `length()`
`XMLString` `normalize(int mode)`
`void` `release()` Release all resources hold by this XMLString.
`XMLString` `replace(int offset, int count, java.lang.String data)`
`void` `reset()`
`void` `reuse()`
`void` `setData(char[] ch, int offset, int len)`
`int` `startOffset()`
`java.lang.CharSequence` `subSequence(int start, int end)`
`java.lang.String` `substring(int start, int count)`
`void` `toSAX(org.xml.sax.ContentHandler ch)`
`java.lang.String` `toString()`
`XMLString` `transformToLower()`
`byte[]` `UTF8Encode(byte[] b, int offset)`
`int` `UTF8Size()`

Methods inherited from class java.lang.Object
`getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### SUPPRESS_NONE

    public static final int SUPPRESS_NONE

See Also:
  Constant Field Values

### SUPPRESS_LEADING_WS

    public static final int SUPPRESS_LEADING_WS

See Also:
  Constant Field Values

### SUPPRESS_TRAILING_WS

    public static final int SUPPRESS_TRAILING_WS

See Also:
  Constant Field Values

### SUPPRESS_BOTH

    public static final int SUPPRESS_BOTH

See Also:
  Constant Field Values

### DEFAULT_CAPACITY

    public static final int DEFAULT_CAPACITY

See Also:
  Constant Field Values

Constructor Detail

### XMLString

    public XMLString()

### XMLString

    public XMLString(int capacity)

### XMLString

    public XMLString(char[] ch)

### XMLString

    public XMLString(char[] ch,
                     int start,
                     int length)

Method Detail

### append

    public final XMLString append(java.lang.String str)

### append

    public final XMLString append(char[] ch)

### append

    public final XMLString append(char[] ch,
                                  int offset,
                                  int len)

### append

    public final XMLString append(XMLString other)

### append

    public final XMLString append(char ch)

### setData

    public final void setData(char[] ch,
                              int offset,
                              int len)

### normalize

    public final XMLString normalize(int mode)

### isWhitespaceOnly

    public final boolean isWhitespaceOnly()

### toString

    public final java.lang.String toString()

  Specified by:
    `toString` in interface `java.lang.CharSequence`

### length

    public final int length()

  Specified by:
    `length` in interface `java.lang.CharSequence`

### startOffset

    public final int startOffset()

### substring

    public final java.lang.String substring(int start,
                                            int count)

### delete

    public final XMLString delete(int start,
                                  int count)

### insert

    public final XMLString insert(int offset,
                                  java.lang.String data)

### replace

    public final XMLString replace(int offset,
                                   int count,
                                   java.lang.String data)

### charAt

    public final char charAt(int pos)

  Specified by:
    `charAt` in interface `java.lang.CharSequence`

### reset

    public final void reset()

### reuse

    public final void reuse()

### release

    public final void release()

  Release all resources hold by this XMLString.

### subSequence

    public final java.lang.CharSequence subSequence(int start,
                                                    int end)

  Specified by:
    `subSequence` in interface `java.lang.CharSequence`

### transformToLower

    public final XMLString transformToLower()

### UTF8Size

    public final int UTF8Size()

### UTF8Encode

    public final byte[] UTF8Encode(byte[] b,
                                   int offset)

### toSAX

    public final void toSAX(org.xml.sax.ContentHandler ch)
                     throws org.xml.sax.SAXException

  Throws:
    `org.xml.sax.SAXException`

### compareTo

    public final int compareTo(java.lang.Object o)

  Specified by:
    `compareTo` in interface `java.lang.Comparable`

### equals

    public boolean equals(java.lang.Object anObject)

### hashCode

    public int hashCode()

Copyright (C) Wolfgang Meier. All rights reserved.