|
Oracle Fusion Middleware Java API Reference for Oracle TopLink 11g Release 1 (11.1.1) B32476-03 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.toplink.internal.sessions.AbstractRecord oracle.toplink.ox.record.XMLRecord oracle.toplink.ox.record.MarshalRecord oracle.toplink.ox.record.WriterRecord
public class WriterRecord
Use this type of MarshalRecord when the marshal target is a Writer and the XML should be not be formatted with carriage returns and indenting.
XMLContext xmlContext = new XMLContext("session-name");
XMLMarshaller xmlMarshaller = xmlContext.createMarshaller();
WriterRecord writerRecord = new WriterRecord();
writerRecord.setWriter(myWriter);
xmlMarshaller.marshal(myObject, writerRecord);
If the marshal(Writer) and setFormattedOutput(false) method is called on XMLMarshaller, then the Writer is automatically wrapped in a WriterRecord.
XMLContext xmlContext = new XMLContext("session-name");
XMLMarshaller xmlMarshaller = xmlContext.createMarshaller();
xmlMarshaller xmlMarshaller.setFormattedOutput(false);
xmlMarshaller.marshal(myObject, myWriter);
XMLMarshaller
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from interface java.util.Map |
---|
java.util.Map.Entry<K,V> |
Constructor Summary | |
---|---|
WriterRecord()
|
Method Summary | |
---|---|
java.io.Writer |
getWriter()
Return the Writer that the object will be marshalled to. |
void |
node(org.w3c.dom.Node node,
NamespaceResolver namespaceResolver)
Receive notification of a node. |
void |
setWriter(java.io.Writer writer)
Set the Writer that the object will be marshalled to. |
Methods inherited from class oracle.toplink.ox.record.MarshalRecord |
---|
clear, closeStartGroupingElements, endPrefixMapping, endPrefixMappings, getDocument, getDOM, getLocalName, getNamespaceURI, getPositionalNodes, startPrefixMapping, startPrefixMappings, transformToXML |
Methods inherited from class oracle.toplink.ox.record.XMLRecord |
---|
contains, getDocPresPolicy, getNamespaceResolver, resolveNamespacePrefix, setDocPresPolicy, setNamespaceResolver |
Methods inherited from class oracle.toplink.internal.sessions.AbstractRecord |
---|
containsKey, containsKey, containsValue, elements, entrySet, get, get, getValues, getValues, isEmpty, keys, keySet, put, put, putAll, size, values |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
---|
equals, hashCode |
Constructor Detail |
---|
public WriterRecord()
Method Detail |
---|
public java.io.Writer getWriter()
public void setWriter(java.io.Writer writer)
writer
- The marshal target.public void node(org.w3c.dom.Node node, NamespaceResolver namespaceResolver)
node
in class MarshalRecord
node
- The Node to be added to the documentnamespaceResolver
- The NamespaceResolver can be used to resolve the
namespace URI/prefix of the node
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |