Class XMLStringBuffer
- java.lang.Object
-
- org.smooks.engine.delivery.sax.ng.org.apache.xerces.xni.XMLString
-
- org.smooks.engine.delivery.sax.ng.org.apache.xerces.util.XMLStringBuffer
-
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
, andlength
fields directly. These fields are managed by the string buffer. In order to reset the buffer, callclear()
.- Version:
- $Id$
- Author:
- Andy Clark, IBM, Eric Ye, IBM
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_SIZE
Default buffer size (32).
-
Constructor Summary
Constructors Constructor Description XMLStringBuffer()
XMLStringBuffer(char c)
Constructs a string buffer from a char.XMLStringBuffer(char[] ch, int offset, int length)
Constructs a string buffer from the specified character array.XMLStringBuffer(int size)
XMLStringBuffer(String s)
Constructs a string buffer from a String.XMLStringBuffer(XMLString s)
Constructs a string buffer from the specified XMLString.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
append(char c)
appendvoid
append(char[] ch, int offset, int length)
appendvoid
append(String s)
appendvoid
append(XMLString s)
appendvoid
clear()
Clears the string buffer.
-
-
-
Field Detail
-
DEFAULT_SIZE
public static final int DEFAULT_SIZE
Default buffer size (32).- See Also:
- Constant Field Values
-
-
Constructor Detail
-
XMLStringBuffer
public XMLStringBuffer()
-
XMLStringBuffer
public XMLStringBuffer(int size)
- Parameters:
size
-
-
XMLStringBuffer
public XMLStringBuffer(char c)
Constructs a string buffer from a char.
-
XMLStringBuffer
public XMLStringBuffer(String s)
Constructs a string buffer from a String.
-
XMLStringBuffer
public XMLStringBuffer(char[] ch, int offset, int length)
Constructs a string buffer from the specified character array.
-
XMLStringBuffer
public XMLStringBuffer(XMLString s)
Constructs a string buffer from the specified XMLString.
-
-