com.cedarsoft.serialization.stax
Class AbstractStaxSerializer<T,C>
java.lang.Object
com.cedarsoft.serialization.AbstractSerializer<T,C,S,javax.xml.stream.XMLStreamReader,javax.xml.stream.XMLStreamException>
com.cedarsoft.serialization.stax.AbstractStaxBasedSerializer<T,C,javax.xml.stream.XMLStreamWriter>
com.cedarsoft.serialization.stax.AbstractStaxSerializer<T,C>
- Type Parameters:
T - the typeC - the type of the context
- All Implemented Interfaces:
- PluggableSerializer<T,C,javax.xml.stream.XMLStreamWriter,javax.xml.stream.XMLStreamReader,javax.xml.stream.XMLStreamException>, Serializer<T,C>
- Direct Known Subclasses:
- AbstractStaxSerializingStrategy
public abstract class AbstractStaxSerializer<T,C>
- extends AbstractStaxBasedSerializer<T,C,javax.xml.stream.XMLStreamWriter>
|
Method Summary |
void |
serialize(T object,
java.io.OutputStream out,
C context)
Serializes the object to the given output stream |
protected void |
serializeFormatVersion(javax.xml.stream.XMLStreamWriter writer,
Version formatVersion)
Serializes the format version to the given element |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractStaxSerializer
protected AbstractStaxSerializer(@NotNull@NonNls
java.lang.String defaultElementName,
@NotNull
VersionRange formatVersionRange)
serialize
public void serialize(@NotNull
T object,
@NotNull
java.io.OutputStream out,
@Nullable
C context)
throws java.io.IOException
- Description copied from interface:
Serializer
- Serializes the object to the given output stream
- Parameters:
object - the objectout - the out streamcontext - the context (optional)
- Throws:
java.io.IOException
serializeFormatVersion
protected void serializeFormatVersion(@NotNull
javax.xml.stream.XMLStreamWriter writer,
@NotNull
Version formatVersion)
throws javax.xml.stream.XMLStreamException
- Serializes the format version to the given element
- Parameters:
writer - the writerformatVersion - the format version
- Throws:
javax.xml.stream.XMLStreamException
Copyright © 2009 cedarsoft GmbH. All Rights Reserved.