public interface NodeCreator
counterpart of this interface that provides read access to
streaming node graphs.,
NodeStreamWriter| Modifier and Type | Method and Description |
|---|---|
NodeCreator |
addAttribute(String key,
String value)
Adds an attribute to the current node.
|
NodeCreator |
addNode(String name)
Creates a new child node under the current node.
|
NodeCreator |
closeEntity()
Closes the current node and returns a reference to the parent node.
|
NodeCreator |
setContent(Reader data)
Similar to
setContentAsString(String), but passes the
content to the NodeCreator as a Reader instance. |
NodeCreator |
setContentAsBigDecimal(BigDecimal bigDecimal) |
NodeCreator |
setContentAsBigInteger(BigInteger bigInteger)
Similar to
setContentAsString(String), but sets the
content to the specified BigInteger instance. |
NodeCreator |
setContentAsBinary(byte[] bytes)
Similar to
setContentAsString(String), but sets the
content to the specified byte[] instance. |
NodeCreator |
setContentAsBoolean(Boolean bool)
Similar to
setContentAsString(String), but sets the
content to the specified Boolean instance. |
NodeCreator |
setContentAsDate(Date date)
Similar to
setContentAsString(String), but sets the
content to the specified Date instance. |
NodeCreator |
setContentAsString(String string)
Sets the content of the current node to be the specified string.
|
NodeCreator addNode(String name)
name - the name of the new child node.NodeCreator closeEntity()
NodeCreator setContentAsDate(Date date)
setContentAsString(String), but sets the
content to the specified Date instance.date - the value to setNodeCreator setContentAsBigInteger(BigInteger bigInteger)
setContentAsString(String), but sets the
content to the specified BigInteger instance.bigInteger - the value to setNodeCreator setContentAsBigDecimal(BigDecimal bigDecimal)
NodeCreator setContentAsString(String string)
closeEntity().
Use null to explicitly encode the null value (results in
<node xsi:nil="true"/> in XML, while an empty
string produces <node></node>).
string - the content for the current node.NodeCreator setContentAsBoolean(Boolean bool)
setContentAsString(String), but sets the
content to the specified Boolean instance.bool - the value to setNodeCreator setContentAsBinary(byte[] bytes)
setContentAsString(String), but sets the
content to the specified byte[] instance.bytes - the value to setNodeCreator setContent(Reader data) throws IOException
setContentAsString(String), but passes the
content to the NodeCreator as a Reader instance. Use this
to encode large chunks of content in a memory-efficient way.data - the content to setIOExceptionNodeCreator addAttribute(String key, String value)
key - the attribute keyvalue - the attribute valueCopyright © 2018 Atlassian. All rights reserved.