public abstract class OMSerializableImpl extends Object implements OMSerializable
| Constructor and Description |
|---|
OMSerializableImpl(OMFactory factory) |
| Modifier and Type | Method and Description |
|---|---|
void |
close(boolean build)
If a builder and parser is associated with the node, it is closed.
|
abstract OMXMLParserWrapper |
getBuilder() |
OMFactory |
getOMFactory()
Get the
OMFactory that created this information item. |
abstract void |
internalSerialize(XMLStreamWriter writer,
boolean cache)
Serializes the node.
|
void |
serialize(OutputStream output) |
void |
serialize(OutputStream output,
OMOutputFormat format) |
void |
serialize(Writer writer) |
void |
serialize(Writer writer2,
OMOutputFormat format) |
void |
serialize(XMLStreamWriter xmlWriter)
Serializes the information item with caching.
|
void |
serialize(XMLStreamWriter xmlWriter,
boolean cache)
Serializes the information item to the given
XMLStreamWriter. |
void |
serializeAndConsume(OutputStream output) |
void |
serializeAndConsume(OutputStream output,
OMOutputFormat format) |
void |
serializeAndConsume(Writer writer) |
void |
serializeAndConsume(Writer writer2,
OMOutputFormat format) |
void |
serializeAndConsume(XMLStreamWriter xmlWriter)
Serializes the information item without caching.
|
abstract void |
setComplete(boolean state) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbuild, isCompletecloneprotected OMFactory factory
public OMSerializableImpl(OMFactory factory)
public OMFactory getOMFactory()
OMInformationItemOMFactory that created this information item.getOMFactory in interface OMInformationItempublic abstract OMXMLParserWrapper getBuilder()
public void close(boolean build)
OMSerializableclose in interface OMSerializablebuild - if true, the object is built first before closing the builder/parserpublic abstract void setComplete(boolean state)
public abstract void internalSerialize(XMLStreamWriter writer, boolean cache) throws XMLStreamException
writer - XMLStreamExceptionpublic void serialize(XMLStreamWriter xmlWriter) throws XMLStreamException
OMSerializableOMSerializable.serialize(XMLStreamWriter, boolean) with cache set to
true.serialize in interface OMSerializableXMLStreamExceptionpublic void serializeAndConsume(XMLStreamWriter xmlWriter) throws XMLStreamException
OMSerializableOMSerializable.serialize(XMLStreamWriter, boolean) with cache set to
false.serializeAndConsume in interface OMSerializableXMLStreamExceptionpublic void serialize(XMLStreamWriter xmlWriter, boolean cache) throws XMLStreamException
OMSerializableXMLStreamWriter.
The implementation of this method must satisfy the following requirements:
DataHandlerWriter extension, then base64 binary data
MUST be written using one of the methods defined by that extension. This will occur if the
information item is an OMText node for which OMText.isBinary() returns
true or if it is an OMContainer that has such an OMText node as
descendant. If the writer doesn't expose the DataHandlerWriter extension, then the
implementation MUST use XMLStreamWriter.writeCharacters(String) or
XMLStreamWriter.writeCharacters(char[], int, int) to write the base64 encoded data to
the stream.
XMLStreamWriter.writeNamespace(String, String) and
XMLStreamWriter.writeDefaultNamespace(String). This requirement is always applicable,
even if the method is used to serialize a subtree or if the object model is not well formed
with respect to namespaces. This means that the implementation is expected to implement
namespace repairing and that the implementation MUST NOT assume that the
XMLStreamWriter supplied by the caller performs any kind of namespace repairing.
XMLStreamWriter.getPrefix(String) and/or
XMLStreamWriter.getNamespaceContext() to query the pre-existing namespace context.
On the other hand, the caller of this method must ensure that the following requirements are satisfied:
XMLStreamWriter.getPrefix(String)
and XMLStreamWriter.getNamespaceContext() MUST accurately reflect the actual
namespace context at the location in the output document where the information item is
serialized. In practice this requirement means that if the caller writes content to the
XMLStreamWriter before calling this method, then it must use
XMLStreamWriter.setPrefix(String, String) and
XMLStreamWriter.setDefaultNamespace(String) to update the namespace context. Note
that this requirement may be relaxed if the caller implements some form of namespace
repairing.
serialize in interface OMSerializablecache - indicates if caching should be enabledXMLStreamExceptionpublic void serialize(OutputStream output) throws XMLStreamException
XMLStreamExceptionpublic void serialize(Writer writer) throws XMLStreamException
XMLStreamExceptionpublic void serializeAndConsume(OutputStream output) throws XMLStreamException
XMLStreamExceptionpublic void serializeAndConsume(Writer writer) throws XMLStreamException
XMLStreamExceptionpublic void serialize(OutputStream output, OMOutputFormat format) throws XMLStreamException
XMLStreamExceptionpublic void serialize(Writer writer2, OMOutputFormat format) throws XMLStreamException
XMLStreamExceptionpublic void serializeAndConsume(OutputStream output, OMOutputFormat format) throws XMLStreamException
XMLStreamExceptionpublic void serializeAndConsume(Writer writer2, OMOutputFormat format) throws XMLStreamException
XMLStreamExceptionCopyright © 2004–2024 The Apache Software Foundation. All rights reserved.