Table of Contents

Class XMPSerializerHelper

Namespace
iText.Kernel.XMP.Impl
Assembly
itext.kernel.dll

Serializes the

XMPMeta
-object to an
OutputStream
according to the
SerializeOptions
.
public class XMPSerializerHelper
Inheritance
XMPSerializerHelper
Inherited Members

Constructors

XMPSerializerHelper()

public XMPSerializerHelper()

Methods

Serialize(XMPMetaImpl, Stream, SerializeOptions)

Static method to serialize the metadata object.

public static void Serialize(XMPMetaImpl xmp, Stream output, SerializeOptions options)

Parameters

xmp XMPMetaImpl

a metadata implementation object

output Stream
options SerializeOptions

serialization options, can be

null
for default.

Remarks

Static method to serialize the metadata object. For each serialisation, a new XMPSerializer instance is created, either XMPSerializerRDF or XMPSerializerPlain so thats its possible to serialialize the same XMPMeta objects in two threads.

Exceptions

XMPException

if serialization failed

SerializeToBuffer(XMPMetaImpl, SerializeOptions)

Serializes an

XMPMeta
-object as RDF into a byte buffer.
public static byte[] SerializeToBuffer(XMPMetaImpl xmp, SerializeOptions options)

Parameters

xmp XMPMetaImpl

a metadata implementation object

options SerializeOptions

Options to control the serialization (see SerializeOptions ).

Returns

byte[]

Returns a byte buffer containing the serialized RDF.

Exceptions

XMPException

on serialization errors.

SerializeToString(XMPMetaImpl, SerializeOptions)

Serializes an

XMPMeta
-object as RDF into a string.
public static string SerializeToString(XMPMetaImpl xmp, SerializeOptions options)

Parameters

xmp XMPMetaImpl

a metadata implementation object

options SerializeOptions

Options to control the serialization (see SerializeOptions ).

Returns

string

Returns a string containing the serialized RDF.

Remarks

Serializes an

XMPMeta
-object as RDF into a string. Note: Encoding is forced to UTF-16 when serializing to a string to ensure the correctness of "exact packet size".

Exceptions

XMPException

on serialization errors.