org.apache.xerces.util
Class XMLStringBuffer
java.lang.Object
org.apache.xerces.xni.XMLString
org.apache.xerces.util.XMLStringBuffer
public class XMLStringBuffer
extends org.apache.xerces.xni.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()
.
$Id: XMLStringBuffer.java 319806 2004-02-24 23:15:58Z mrglavas $- Andy Clark, IBM
- Eric Ye, IBM
void | append(String s) - append
|
void | append(char c) - append
|
void | append(char[] ch, int offset, int length) - append
|
void | append(org.apache.xerces.xni.XMLString s) - append
|
void | clear() - Clears the string buffer.
|
DEFAULT_SIZE
public static final int DEFAULT_SIZE
Default buffer size (32).
XMLStringBuffer
public XMLStringBuffer()
XMLStringBuffer
public XMLStringBuffer(String s)
Constructs a string buffer from a String.
XMLStringBuffer
public XMLStringBuffer(char c)
Constructs a string buffer from a char.
XMLStringBuffer
public XMLStringBuffer(char[] ch,
int offset,
int length)
Constructs a string buffer from the specified character array.
XMLStringBuffer
public XMLStringBuffer(int size)
XMLStringBuffer
public XMLStringBuffer(org.apache.xerces.xni.XMLString s)
Constructs a string buffer from the specified XMLString.
append
public void append(String s)
append
append
public void append(char c)
append
append
public void append(char[] ch,
int offset,
int length)
append
append
public void append(org.apache.xerces.xni.XMLString s)
append
clear
public void clear()
Clears the string buffer.
- clear in interface org.apache.xerces.xni.XMLString
Copyright B) 1999-2006 The Apache Software Foundation. All Rights Reserved.