public class InMemory extends java.lang.Object implements XMLProducer
| Modifier and Type | Field and Description |
|---|---|
private int |
mSize
The initial size of the buffer.
|
private java.lang.StringBuffer |
mStore
The StringBuffer store.
|
| Constructor and Description |
|---|
InMemory()
The default constructor.
|
InMemory(int size)
The overloaded constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(java.lang.String xml)
Adds to the internal XML representation.
|
void |
clear()
Clears the internal state.
|
private void |
reset()
Resets the internal store.
|
java.lang.String |
toXML()
Returns the interaction assertions as a XML blob.
|
void |
toXML(java.io.Writer writer)
Returns the xml description of the object.
|
private java.lang.StringBuffer mStore
private int mSize
public InMemory()
public InMemory(int size)
size - the intial number of characters it can store.public void add(java.lang.String xml)
add in interface XMLProducerxml - the XML fragment to be added.public void clear()
clear in interface XMLProducerpublic void toXML(java.io.Writer writer)
throws java.io.IOException
toXML in interface XMLProducerwriter - is a Writer opened and ready for writing. This can also
be a StringWriter for efficient output.java.io.IOException - if something fishy happens to the stream.public java.lang.String toXML()
throws java.io.IOException
toXML in interface XMLProducerjava.io.IOException - if something fishy happens to the stream.private void reset()